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