This may have a very simple solution. I have a workflow that runs a component with a Json Call that does an API call. If the API call succeeds the data is stored in a database table. No problem. But what to do if it fails?
In the Json Call I've created a Response Code Column called jsoncall_response. And if jsoncall_response=200 that means it was successful.
But what to do if it is not successful? I can use a text writer to write that data to file. Actually I would like to see the component and the workflow fail. But there isn't a "Break” or “Fail” step as far as I can see. The closest that I can find is the Stop Reading step.
BTW I've tried Stop Reading, but it seems to ignore my condition.
In the Jscon Call I put in a misformed url and in the debug it clearly gave a HTTP 405 response. That didn't seem to stop it from going further. In the SNOW response output file it even wrote that jsoncall_response was indeed 405.
Alternatively I've been thinking about maybe sending notifications from the error flow (though on our site I can't send mail from test and acceptance environments, so that would be harder to test).
What is the best way to approach this?