Error format for Shopper APIs
Understand the error code format for the Shopper APIs.
Understanding how error responses are structured is crucial for diagnosing and resolving issues that may arise in the development and integration process of working with the Shopper APIs. The API distinguishes itself by providing detailed error messages following a structured format. This format includes essential information such as the type of error, an optional system info parameter, and a clear problem description. Below is an overview of the error response format used by the Shopper APIs, designed to assist developers in quickly identifying and addressing issues.
The Shopper APIs use the following format for errors:
How to handle errors
When you encounter an error response from the Shopper APIs, follow these steps to handle and resolve the issues effectively:
Identify the error: Review the
code
andsubcode
in the error response. These fields classify the error, helping you understand its nature and potential cause.Understand the error: Read the
description
field to clearly understand what went wrong. This description provides insight into the issue and can suggest immediate fixes.Consult documentation: See the Error codes for Shopper APIs section relevant to the error encountered. It can provide additional context or solutions.
Implement fixes: Based on the information gathered, make the necessary adjustments to your request or handling logic. It might entail fixing payloads, adjusting headers, or handling expected errors more gracefully in your application.
Log and monitor: Always log errors and monitor their frequency. Persistent errors could indicate deeper issues with integration or with the API itself. Monitoring can help identify patterns or recurring issues.
Contact support: If you encounter an API error that keeps occurring, you should create a case in the Solution Center. You can contact your CSM for more help or escalate the issue if necessary. In addition, if we log the error on our system, we may have monitoring set up to automatically create a case when a particular error occurs multiple times within a specific timeframe to help us investigate and address the issue promptly.
By systematically following these steps, you can minimize the impact of errors on your application and improve the overall stability and reliability of your integration with the Shopper APIs.
Last updated