Call Rest (Get) return code

Was wondering if anyone knows where or how you can view the return code from the called API service. I'm using import mapping in the repsonse but that does not return the header info (return value) when the API fails. Would like to add some error handling when a record not found, API failed, or system not available.
1 answers


That information is accessible in version 7 and above.  Snippet from release notes below:

Access to HTTP response for REST calls

It is now possible to access the latest HTTP response and the HTTP headers through the $latestHttpResponse variable. You can also access the message body of the HTTP response via this variable in the error flow (for status codes other than 2XX).

In addition, it is now possible to select HTTP response as the return type of the REST call action.

Hope that helps,