I have connected an external API to ION API and have been able to connect to it properly. However, I have a hard time getting the error handling to work.
The external API is structured to give a 200 response when the API is processed OK with a json body response with the following structure:
{
<span class="hljs-attr">"result": {},
<span class="hljs-attr">"resultMessage": "string",
<span class="hljs-attr">"status": "100 CONTINUE"
}<br /><br /><span style="font-family:inherit;"><span style="font-family:arial, helvetica, sans-serif;">When the API fails (due to incorrect data in the input) the http response code is 500 with details about the error in the response body with the following structure:<br /><br />{<br /> "date": "dateTime",<br /> "status": "integer,<br /> "message": "string",<br /> "details": "string",<br /> "description": "string"<br />}<br /><br /><span style="font-family:arial, helvetica, sans-serif;">I would then want to retrieve these details to be able to route the workflow in different ways depending on this status, and send a notification to the user with the error message.<br />How can I configure the workflow to pick this information up? If I set the workflow to continue when an error occur, I still cannot set the response information as output parameters since it only seems to <br />pick up the output parameters if the response is 200. I can set the response status code to a variable but then I will only pick up 500 and I cannot send a notification to the user with the error message.<br /><br />