Legacy Dev Forum Posts

 View Only

Sign Up

How to parse 500 errors from Data Action so they can be put into Participant Data

  • 1.  How to parse 500 errors from Data Action so they can be put into Participant Data

    Posted 06-05-2025 18:42

    VaunMcCarthy | 2020-10-12 02:06:52 UTC | #1

    How can I translate an error returned from a Data Action so that it can be mapped to Contracts and then be available to a callflow for attaching as Participant Data?

    Example error response:

    { "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "code": "internal.server.error", "status": 500, "messageParams": {}, "contextId": "532fd21c-9100-445f-be35-e03600100116", "details": [ { "errorCode": "ACTION.REMOTEENDPOINT" } ], "errors": [ { **"message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: {\"message\":\"GatewayError: RC=3114, MSGNO=3114, MSGTEXT=Already ordered, SourceLocation=IGI4090\",\"errorCode\":\"UPSTREAMSYSTEMERROR\"} [532fd21c-9100-445f-be35-e03600100116]",** "code": "INTERNALSERVER_ERROR", "status": 502, "messageParams": {}, "details": [], "errors": [] } ] }

    I want to be able to get the message part above in bold extracted out.


    Jason_Mathison | 2020-10-12 11:41:34 UTC | #2

    If this is a Architect call flow then it is effectively impossible to get this message out. In a call flow, if a data action takes the error path pretty much all other context information is lost. Other media types use a different processing system that does not have this limitation.

    A couple of options: Modify the remote web service (or add a new route) so it always returns 200, but indicates in the body if the request was successful.

    Have a middleware web service between your Data Action and the remote webservice that will always return 200 and indicate if the request was successful.

    Create a new idea at https://genesyscloud.ideas.aha.io/ideas/ to get error details returned to architect.

    --Jason


    system | 2020-11-12 11:41:40 UTC | #3

    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: 9023