Error Format
| Field | Description |
|---|---|
type | Error type URI |
title | Short error name |
status | HTTP status code |
detail | Human-readable explanation |
HTTP Status Codes
| Code | Title | Retryable | Description |
|---|---|---|---|
| 400 | Bad Request | No | Invalid request format |
| 401 | Unauthorized | No | Invalid or missing token |
| 402 | Payment Required | No | Insufficient credits |
| 403 | Forbidden | No | Valid token, insufficient permissions |
| 404 | Not Found | No | Resource doesn’t exist |
| 409 | Conflict | No | Resource already exists |
| 422 | Unprocessable Entity | No | Validation failed |
| 429 | Too Many Requests | Yes | Rate limit exceeded |
| 500 | Internal Server Error | Yes | Server error |
Common Errors
401 - Invalid Token
403 - Missing Scope
429 - Rate Limited
Retry-After seconds.
402 - Insufficient Credits
Rate Limits
| Scope | Limit |
|---|---|
| Per organization | 300 requests/minute |
| Per user | 60 requests/minute |
Retry Logic
Implement exponential backoff for 429 and 5xx errors:Best Practices
- Check status before parsing — Don’t assume success
- Implement retries — For 429 and 5xx errors
- Log error details — Include
detailmessage for debugging - Show user-friendly messages — Don’t expose raw errors to users
- Monitor error rates — Alert on spikes
FAQ
What format do Cuadra AI errors use?
All errors follow RFC 7807 Problem Details format withtype, title, status, and detail fields.
How should I handle rate limits (429)?
Implement exponential backoff. Wait the time specified inRetry-After header, then retry. See retry logic examples above.