Error handling

Learn more about the standards related to logging requests, responses, and errors.

This section's checklist items and standards cover logging requests, responses, and errors. This helps ensure you can provide adequate technical details when seeking support from Digital River or upstream platforms. We also cover the types of error messages you should and should not display to your customers.

Integration checklist

Click any checklist item to se more detail on how to meet the integration standard.

Integration standards

These integration standards relate to error handling and logging:

Log appropriate API requests and responses

Logging all of your platform's successful and failed API calls is good practice, especially during the development and testing phases. However, when you're making a large number of calls, this can quickly become overwhelming.

You may decide to add a toggle to your tool that allows you to enable or disable debug logging. This would permit each client site that implements the tool to turn off logging when necessary.

Pass failure responses to your commerce system

All the Digital River APIs respond with standardized HTTP status codes. In case they are needed for support purposes, your platform should log the error responses in the 4xx and 5xx range. We recommend you do this regardless of whether you have a setting to disable bug logging. Your error logs should include a timestamp, HTTP code, the URL of the API, and the API request and response payloads.

Display errors to customers

When customers encounter errors during the checkout process or while interacting with your tool, you should provide them with simple but meaningful messages. You should not, however, share specific error codes. Doing so increases the probability that attempts to commit fraud and other malicious attacks will eventually succeed.

Last updated