Error Response Structure
All API errors return a JSON response:HTTP Status Codes
Success Codes (2xx)
Client Error Codes (4xx)
Server Error Codes (5xx)
Error Handling with the SDK
The SDK returns typed responses that may contain either a success or error response:Error Handling with HTTP
Retry Strategy
Implement exponential backoff for transient errors (429, 5xx):Best Practices
Always Handle Errors
Always Handle Errors
Never assume API calls will succeed:
Use Specific Error Handlers
Use Specific Error Handlers
Handle different status codes appropriately:
Implement Timeouts
Implement Timeouts
Set reasonable timeouts:
Next Steps
Usage & Limits
Understand usage metering
Pagination
Handle paginated responses