Unable to pull the Error details from the response payload received from Integration API request

In case of any wrong input in the request or issue at the Oauth app/Mulesoft side, a response payload with error details is sent by Oauthapp/Mulesoft Action, we want to capture the errors >> message ("errors": [
{
"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service:... [...]".")

We have the following Failure outputs captured for the data action in architect, but none of them captures the one above mentioned.
errorCode
Status
correlationID
entityId
entityName
userMessage
userParamsMessage
userParams.key
userParams.value
details.errorCode
details.fieldName
details.entityId
details.entityName

Following is the sample failure response from oauthapp/Mulesoft -

We checked with Mulesoft integration team and found out that they are sending or have access to update and send only the following -

{

"errorStatus": "BAD Request",

"errorDescription": "HTTP POST on resource 'https://api-XXX... failed: bad request (400).",

"responsePayload": {

"errorStatus": "BAD Request",

"errorDescription": "HTTP POST on resource 'https://xxxxx failed: bad request (400).",

"transactionId": "0009e3e7-dc9a-45fa-a092-004af2cdd4e6",

"correlationId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

"suggested-action": "Please check your request."

},

"transactionId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

"correlationId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

"suggested-action": "Please check your request."

}

in Genesys cloud we see additional structure, following (also underlined the mulesoft response)-

{

"message": "The request could not be understood by the server due to malformed syntax.",

"code": "bad.request",

"status": 400,

"messageParams": {},

"contextId": "2955bc8c-3832-4b5b-90fd-6b555701c5d1",

"details": [

{

"errorCode": "ACTION.REMOTE_ENDPOINT"

}

],

"errors": [

{

"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {\n "errorStatus": "BAD Request",\n "errorDescription": "HTTP POST on resource 'https://api-XXX' failed: bad request (400).",\n "responsePayload": {\n "errorStatus": "BAD Request",\n "errorDescription": "HTTP POST on resource 'https://xxxxx' failed: bad request (400).",\n "transactionId": "54f82daa-1abd-4e67-8b2e-c54c0fad0cf5",\n "correlationId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n "suggested-action": "Please check your request."\n },\n "transactionId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n "correlationId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n "suggested-action": "Please check your request."\n} [2955bc8c-3832-4b5b-90fd-6b555701c5d1]",

"code": "BAD_REQUEST",

"status": 400,

"messageParams": {},

"details": [],

"errors": []

}

]

We are unable to capture the response from Mulesoft, in Architect data action block, we see the following kvps in failure path of data action block -

errorCode

Status

correlationID

entityId

entityName

userMessage

userParamsMessage

userParams.key

userParams.value

details.errorCode

details.fieldName

details.entityId

details.entityName

and following is the mapping between the Key and failure response from the above

errorCode - "code": "BAD_REQUEST"

Status - "status": 400

correlationID - BLANK

entityId - BLANK

entityName - BLANK

userMessage - "message": "The request could not be understood by the server due to malformed syntax."

userParamsMessage - BLANK

userParams.key - BLANK

userParams.value - BLANK

details.errorCode- "errorCode": "ACTION.REMOTE_ENDPOINT"

details.fieldName - BLANK

details.entityId - BLANK

details.entityName - BLANK

How can we retrieve the one which we had underlined above? Is there any way thru which we can modify the contract? I understand Output contract is for success, is there anything for failure too?

#ArchitectureandDesign
#Integrations


Harsha Shenoy
Conn3ct (Connect Managed Services (UK) Limited)

Hi Harsha,

If this is for a voice IVR flow, unfortunately most of the failure response doesn't make it back to architect. The failure response should make it back to other media type flows.

There is an idea you can vote for to add a "failure template":
https://genesyscloud.ideas.aha.io/ideas/INB-I-1498
Feel free to vote for that ticket and add your use case, or create a new idea for supporting the failure path in call flows.

Out of curiosity, if you were able to return that sample response to your flow, how would use it to find and fix the issue?

--Jason

Thanks Jason, yes its for non voice interactions. if we are able to catch the reason for failure (sent by the application to GC via api response), we would be able to find the root cause quickly.
I have voted for that Idea, its matches my requirement.

My general suggestion for a situation like this would be in the data action failure path record the inputs that you used somehow (Maybe set it in participant data or push it to a data table). Then test out those inputs in the Data Action test mode to figure out what kind of inputs are failing so you can fix the flow logic.

We recognize that this isn't a great way to approach these issues and are working on some better options.

--Jason

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