Error Handling
The Fanfare API uses conventional HTTP response codes to indicate the success or failure of an API request.Error Response Format
All error responses follow a consistent JSON structure:HTTP Status Codes
Success Codes (2xx)
| Code | Description |
|---|---|
200 OK | The request succeeded |
201 Created | A new resource was created |
204 No Content | The request succeeded with no response body |
Client Error Codes (4xx)
| Code | Description |
|---|---|
400 Bad Request | The request was malformed or contained invalid data |
401 Unauthorized | Authentication credentials were missing or invalid |
403 Forbidden | The authenticated user lacks permission for the requested action |
404 Not Found | The requested resource does not exist |
409 Conflict | The request conflicts with the current state of the resource |
413 Payload Too Large | The request body exceeds the maximum allowed size |
423 Locked | The resource is temporarily unavailable (e.g., queue not yet open) |
429 Too Many Requests | Rate limit exceeded |
Server Error Codes (5xx)
| Code | Description |
|---|---|
500 Internal Server Error | An unexpected error occurred on the server |
503 Service Unavailable | The service is temporarily unavailable |