I need to return the error message or status code to an output contract so I can flag the type of error on Architecht for future reports.
For example: I send the get request with a ID that exists and the data action returns the fields I need. But when I send an ID that does ot have any register, the data action fails to execute instead of returning the error message as I configured, so I can know if was a 404, 500...

Here's how I expecting to treat return the errorMessage on the successTemplate:
{
"translationMap": {
"errorMessage": "$.message",
"lineOfBusinessNames": "concat($[*].lineOfBusinessName)"
},
"translationMapDefaults": {
"errorMessage": ""
},
"successTemplate": "{ \"lineOfBusinessNames\": ${lineOfBusinessNames}, \"errorMessage\": \"${errorMessage}\" }"
}
Is this a normal behavior of Data Actions and I can't do what i'm expecting, or is there a way to solve this?
#DataActions------------------------------
Samara Silva
------------------------------