Error Response Format
All error responses include the following structure:HTTP Status Codes
Success Codes
- 200 OK: Request succeeded
- 201 Created: Resource created successfully
- 204 No Content: Request succeeded with no content to return
Client Error Codes
- 400 Bad Request: Invalid request parameters or body
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Valid token but insufficient permissions
- 404 Not Found: Resource doesn’t exist
- 409 Conflict: Resource conflict (e.g., duplicate name)
- 422 Unprocessable Entity: Validation errors
Server Error Codes
- 500 Internal Server Error: Unexpected server error
- 503 Service Unavailable: Service temporarily unavailable
Common Error Scenarios
Invalid Request Body
Authentication Error
Resource Not Found
Validation Errors
Conflict Error
Error Handling Best Practices
- Always check the status code before processing the response body
- Read the error message for human-readable descriptions
- Check the error field for detailed technical information
- Implement retry logic for 5xx errors with exponential backoff
- Log errors for debugging and monitoring
Rate Limit Errors
When rate limits are exceeded, you’ll receive a429 Too Many Requests response:
Retry-After header to know when to retry the request.
