2xx range indicate success. Codes in the 4xx range indicate a client error. Codes in the 5xx range indicate a server-side issue.
Error response body
Error responses return a JSON object carrying a human-readable message:Status codes
Handling errors in code
Check the HTTP status code first, then readerror (falling back to Error) for details.
Python
Node.js
Retry strategy
Only retry on429 and 5xx errors. Client errors (400, 401, 403, 404) will not succeed on retry without changes to the request.
When retrying, use exponential backoff with jitter to avoid overwhelming the API:
For
429 responses, you can also read the X-RateLimit-Remaining header proactively to throttle before hitting the limit. See Rate Limiting for details on quotas and headers.