TABLE OF CONTENTS
When working with external data sets, it’s important to be able to debug failed external requests. To investigate failed requests, use the Console, which you can open using the icon in the bottom-right corner of the screen.
This article outlines how to correctly identify errors using the :response.errorResponse and :error properties.
Key Properties for Error Detection
:response.errorResponse
A boolean that is set to true only if a response was received and the response was considered an error.
Considerations:
- Only captures errors that happen after a response is received.
- The field is not set if no response was received. For example, when the connection to the endpoint has timed-out. In such cases, the entire :response object may be missing, so there is no :response.errorResponse value to evaluate.
- Doesn’t include the actual error message; you may need to check other fields for details.
:error
The :error field returns the payload of the failure response, if available. If the response does not include a payload, then :error will not be set. In some cases, for example, if the request could not be sent at all, the system may populate :error with a server error message instead.
Considerations:
- In Mustache expressions, :error may evaluate as an empty string (""), null, or undefined. As a result, it’s not reliable to check for the presence or absence of :error alone.
- :error alone may not indicate the underlying cause of a failure, especially if no response or payload was received. However, when available, it allows APIs to provide clear error messages that can be displayed to users when something has failed.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article