Errors
Error types, response format, and handling guidance
Error response format
All API errors follow a consistent structure:
The error.type field is a machine-readable string you can use in your code. The error.message field is a human-readable description. The error.errors array is only present for validation errors and contains field-level details.
Error types
Validation errors
When a request fails validation, the response includes a 422 status and field-level error details:
Each entry in the errors array includes the field name and a descriptive message.
Handling errors
Best practices for error handling in your integration:
- Check
error.typerather than parsing the message string. Types are stable; messages may change. - Retry on
429after the duration specified in theRetry-Afterresponse header. - Retry on
500with exponential backoff. If errors persist, contact support. - Do not retry
401,403,404, or422— these indicate issues with your request that require code changes. - Log the full error response for debugging. Include the request method, path, and any request body (redacting sensitive fields).