Concepts
Error Handling
Understand error responses and how to handle them.
The Cue API returns consistent error responses to help you handle issues gracefully.
Error Response Format
All errors return a JSON object with an error field:
{
"error": "Description of what went wrong"
}Common Error Codes
| Code | Description | How to Handle |
|---|---|---|
| 400 | Bad Request - Invalid input data | Check your request body against the API docs |
| 401 | Unauthorized - Invalid or missing API key | Verify your API key is correct |
| 403 | Forbidden - Action not allowed | Check plan limits or permissions |
| 404 | Not Found - Resource doesn't exist | Verify the resource ID is correct |
| 429 | Rate Limited - Too many requests | Implement backoff and retry (see Rate Limiting) |
| 500 | Server Error - Something went wrong on our end | Retry after a short delay |
Validation Errors
For 400 errors, the message describes what validation failed:
{
"error": "platforms is required"
}{
"error": "At least one platform must be specified"
}{
"error": "Content is required for each platform"
}