Legacy Dev Forum Posts

 View Only

Sign Up

Error 500 return on custom data action

  • 1.  Error 500 return on custom data action

    Posted 06-05-2025 18:40

    PRada | 2018-05-08 21:50:46 UTC | #1

    Hi -

    Trying to implement a simple custom data action doing an external looking and returning a result. Everything tests out fine in Postman, but testing in PureCloud results in:

    Test Result { "status": 500, "code": "internal.server.error", "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "messageParams": {}, "contextId": "7444a9f0-e50b-406f-bc72-77912bf2257d", "details": [], "errors": [ { "status": 500, "code": "INTERNALSERVERERROR", "message": "REST call for action execute failed. Message:Request to backend service failed. To see error details, execute request in Postman, or other REST tools. [7444a9f0-e50b-406f-bc72-77912bf2257d] [7444a9f0-e50b-406f-bc72-77912bf2257d]", "messageParams": {}, "details": [], "errors": [] } ] }

    Here's the configuration, partially redacted for security. Any guidance would be appreciated.

    Input Contract { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "SchoolCode": { "type": "string" }, "OpportunityID": { "type": "string" }, "PhoneNumber": { "type": "string" } } }

    Output Contract { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "consentValid": { "type": "string" } } }

    Request Configuration { "requestUrlTemplate": "https://[redacted].com/api/Dialer/[Redacted]", "requestType": "POST", "headers": {}, "requestTemplate": "${input.rawRequest}" }

    Response Configuration { "translationMap": { "consentValid": "$.consentValid" }, "successTemplate": "${rawResult}" }

    Thanks!


    Jason_Mathison | 2018-05-09 17:34:27 UTC | #2

    Try out this troubleshooting page:

    https://help.mypurecloud.com/articles/custom-action-web-services-data-actions-integration-fails-unexpected-reason/


    PRada | 2018-05-09 19:24:51 UTC | #3

    Hi Jason -

    Thanks for your reply. Sadly, the change had no effect on the situation. Tried the header case-sensitive and not (not that it should have mattered). Any other thoughts?

    Request Configuration<code> { &nbsp;&nbsp;"requestUrlTemplate": "https://[redacted]com/api/Dialer/[redacted]", &nbsp;&nbsp;"requestType": "POST", &nbsp;&nbsp;"headers": { &nbsp;&nbsp;&nbsp;&nbsp;"transfer-encoding": "buffered" &nbsp;&nbsp;}, &nbsp;&nbsp;"requestTemplate": "${input.rawRequest}" } </code>

    Test Output<code> { &nbsp;&nbsp;"status": 500, &nbsp;&nbsp;"code": "internal.server.error", &nbsp;&nbsp;"message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", &nbsp;&nbsp;"messageParams": {}, &nbsp;&nbsp;"contextId": "9d56a16d-c088-4636-a8d6-1c4d71d687bc", &nbsp;&nbsp;"details": [], &nbsp;&nbsp;"errors": [ &nbsp;&nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"status": 500, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"code": "INTERNALSERVERERROR", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"message": "REST call for action execute failed. Message:Request to backend service failed. To see error details, execute request in Postman, or other REST tools. [9d56a16d-c088-4636-a8d6-1c4d71d687bc] [9d56a16d-c088-4636-a8d6-1c4d71d687bc]", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"messageParams": {}, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"details": [], &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"errors": [] &nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;] } </code>


    PRada | 2018-05-10 19:30:51 UTC | #4

    Ok. buffered was needed. Also turned out there was a dev certificate issue. All good. Thanks.


    system | 2018-06-10 19:30:55 UTC | #5

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 2833