Error Response Format
All error responses follow a consistent format:HTTP Status Codes
Success Codes
Client Error Codes
Server Error Codes
Common Error Codes
Validation Errors
Resource Not Found
Duplicate Resource
Invalid Status Transition
Component In Use
Circular Dependency
Rate Limiting
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
retryAfter field indicates the number of seconds to wait before retrying.
Rate Limit Headers
Rate limit information is included in response headers:Handling Errors
JavaScript Example
Retry Strategy
For transient errors (5xx, 429), implement exponential backoff:Best Practices
Always check the error code
Always check the error code
Use the
code field for programmatic error handling, not the message field which may change.Log error details
Log error details
The
details object contains valuable debugging information. Log it for troubleshooting.Handle rate limits gracefully
Handle rate limits gracefully
Implement exponential backoff and respect the
retryAfter value.Validate before sending
Validate before sending
Validate data client-side before making API calls to avoid unnecessary 400/422 errors.