Error Handling
The Partner API uses standard HTTP status codes to indicate the success or failure of an API request. In the case of an error, the response will include a JSON body with more details about the error.
Error Response Structure
When an error occurs, the API will return a response with a status code in the 4xx or 5xx range. The error object in the JSON body is structured as follows:
While the http status code and type field of the error payload are stable and can be used for programmatic error handling, the message field is intended for debugging purposes only and may change without notice, so it should not be relied upon for logic in your application.
Currently, the invalid_schema error type is the only error with additional fields beyond type and message, but in the future other error types may also include additional fields, so your error handling logic should be designed to ignore any extra fields that may be present in the error response.