Error handling allows you to define which error codes returned from a service can be treated as a success and to retry the request if needed. Error handling can be set up for sources, lookups, and destinations as a whole or can be set up on each individual source, lookup, or destination. Error handling setup is found by going to Error Handling on the main Rest Service Maintenance Page.
Retry Status Codes
Retry status codes allow a request to be made again if one of the defined codes is returned while making the original request.
- Retry On Error – Enable retry codes.
- Maximum Retry Count – Set how many times to retry upon error (max of 10)
- Sleep time between retries – Set the time to wait between requests (max of 100 milliseconds)
- Select status codes – Choose the status codes that will result in a retry.
Data Source/Lookup Error Codes
If a status code has been selected and the response conforms to the match condition, the request will be treated as successful even if no data is returned to the data source or lookup.
Select Status Code – Choose the status codes to be processed as successful.
Match Condition – Choose a condition to check for in the response.
- All instances of selected coded – All instances of the error code will be treated as success.
- Response contains value – Instances of the code plus a response that contains the defined value anywhere in the response will be treated as success.
- Response does not contain value – Instances of the code plus a response that does not contain the defined value anywhere in the response will be treated as success.
- Response has content – Instances of the error code plus any content in the response will be treated as success.
- Response has no content – Instances of the error code plus no content in the response will be treated as success.
After defining source/lookup error codes, navigate to a rest source or lookup and enable the Check unsuccessful response status codes option found under Error Handling for the specific source or lookup.
Destination Error Codes
If a status code has been selected below and the response conforms to the match condition, the request will be treated as successful.
Select Status Code – Choose the status codes to be processed as successful.
Match Condition – Choose a condition to check for in the response.
- All instances of selected coded – All instances of the error code will be treated as success.
- Response contains value – Instances of the code plus a response that contains the defined value anywhere in the response will be treated as success.
- Response does not contain value – Instances of the code plus a response that does not contain the defined value anywhere in the response will be treated as success.
- Response has content – Instances of the error code plus any content in the response will be treated as success.
- Response has no content – Instances of the error code plus no content in the response will be treated as success.
After defining destination error codes, navigate to a rest destination and enable the Check unsuccessful response status codes option found under Error Handling for the specific destination.
Error codes for Specific Sources, lookups, or Destinations
In addition to error codes set up on the main Rest Service Maintenance page, you can define specific error codes for each individual source, lookup, or destination. Navigate to Error Handling for the specific source, lookup, or destination and this page allows specific error code to be used separately or in combination with the main error codes setup. In the example below a 404 error will be handled from the main error code setup and a 403 error code would be handled for this specific source.