request_id for support. This page documents all HTTP status codes, error codes, and recommended handling patterns.
Error Response Shape
When a request fails, the API responds with an appropriate HTTP status code and a JSON body containing anerror object:
HTTP Status Codes
Error Codes
Handling Errors in TypeScript
The TypeScript SDK throws a typedNonhumansError for any non-2xx response. You can inspect the code field to branch on specific error types:
Handling Errors in Python
The Python SDK raises aNonhumansError exception hierarchy. Catch the base class or specific subclasses:
Retrying Failed Requests
For transient errors (429, 500, 503), implement exponential backoff:
400, 401, 403, 404, 409, and 422 errors are not retryable — the same request will produce the same error. Fix the underlying issue before retrying.Getting Help
If you encounter an unexpected500 or behavior that doesn’t match this reference, contact support and include:
- The full error response JSON
- The
request_idfrom the error object - The endpoint and HTTP method you called
- A sanitized version of your request body (remove secrets)