The new HTTP action has shown a little improvement in this - we can now set the "Mark non-2xx response codes as success?" field to "yes".
However, this is often the behaviour that we are looking for when receiving an HTTP error response:
1. Fail the job
2. Include the response body in the job output
To achieve this we need to set "Mark non-2xx response codes as success?" to "yes" and add in an "if" step to check if the status code was greater than 299 and then fail the job! So to get the response body we need to configure it that a non-2xx status code is not a failure, and then add steps to treat such a status code s a failure Just to get the response body that tells us what the failure was!
This could be so much better.
Please add this. Using the HTTP connector is incredibly useful but debugging is mind-numbingly tedious
Bump! This would be so helpful if I had the response body.
Yes please
Send us a ticket, we will try our best to assist you with your problem
Martin Pain
See HTTP error responses
When using the HTTP action to call a REST API, if there is an HTTP error response (e.g. 4xx or 5xx status code) then often the response body contains an explanation of what the problem was. However, Workato discards that response and only saves the status code.
It's really frustrating debugging a failed recipe when I can't see the error response, and when I'm calling a 3rd party system where I don't have access to the logs of that system.
If an HTTP request returns an HTTP error response, I'd like to see the response body when looking at the job.
I understand that in some cases the response might be a large HTML error page with no useful information. If this is likely to be a problem, then only storing JSON or plain text responses would be fine for me. (Although it should probably store the response's Content-Type in any case, so we can see why it didn't store the response if it was filtered out by content-type.)
6 people like this idea