Error Codes
API error codes and how to handle them
The API uses standard HTTP status codes to indicate success or failure.
Status Codes
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Authentication failed |
404 | Not Found | Resource not found |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server-side error |
Error Response Example
{
"message": "Validation failed",
"success": false,
"statusMessage": "NOT_FOUND",
"code": 400
}Handling Errors
- Always check the HTTP status code
- Parse the
messagefield for details - Implement retry logic with exponential backoff for
500errors - Do not retry
4xxerrors — fix the request instead