Error Response Format
HTTP Status Codes
| Code | Description | When Used |
|---|---|---|
400 | Bad Request | Invalid input |
401 | Unauthorized | Missing/invalid API key |
403 | Forbidden | Valid auth, but action not allowed |
404 | Not Found | Resource doesn’t exist |
409 | Conflict | Resource already exists |
413 | Payload Too Large | File exceeds limit |
422 | Unprocessable | Validation error |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Error | Server error |
503 | Unavailable | Dependency failure |
Common Errors
Authentication Errors (401)
Bearer prefix.
Rate Limit Errors (429)
retry_after duration, or upgrade your plan.
Validation Errors (400)
Not Found Errors (404)
Retry Strategy
Implement exponential backoff for transient errors (429, 5xx):Best Practices
Check Status Codes
Always check HTTP status codes before parsing response body
Log Errors
Log the full error response including
details for debuggingImplement Retries
Use exponential backoff for 429 and 5xx errors
Handle Gracefully
Show user-friendly messages, not raw error responses