Is it possible to capture an error response to a data action within an Agent Script?

Example Failure Output:

{
"message": "[Lambda error] Test parseo error 21 Dic [ca11cc8b-bf19-45bf-b9dc-c46e021e5fd8]",
"code": "bad.request",
"status": 400,
"entityName": "arn:aws:lambda:us-east-1:572588032135:function:gns-transferencia-origen-externo-bancolombia-devqa-lambda",
"messageParams": {},
"contextId": "ca11cc8b-bf19-45bf-b9dc-c46e021e5fd8",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": []
}

Example Output Data Actions Script (translationMap):

{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "${rawResult}"
}

If we wanted to capture the response to the failure and display the different errors in the Agent Script, how could we do it? With the above, the Script only has access to the response values of the successful outputs. How would it be necessary to modify the above output configuration or contract in order to have failure outputs available in the Agent Script when the data action is invoked? (e.g. extract the status or message from the error response in the above)

1 Like

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