Error-handling summary
EasyAPI uses HTTP status codes for error categories and can return message, type, and code in an error object. A client should fix the request, check credentials, back off, or contact support according to the status.
Key facts
- 400 means request parameters are invalid or a required field is missing.
- 401 means the API key is missing or invalid.
- 429 means a rate or quota limit was reached, while 500 means an internal server error.
API error FAQ
- How should a client handle 429?
- Reduce request frequency, apply exponential backoff, and review quota and usage instead of immediately repeating the same request at high frequency.
- How should a client handle 500?
- Record the response and request id when present, retry later, and provide non-secret error details to support if the problem continues.
Error Codes and Status Codes
EasyAPI error codes and HTTP status codes: what 400, 401, 429 and 500 errors mean, an OpenAI-style error response example, and retry and troubleshooting tips.
The HTTP status code indicates the error category. The response body may contain an error object (with fields such as message, type and code, compatible with the OpenAI style).
Common errors
| HTTP status | Error code | Description |
|---|---|---|
400 | invalid_request_error | Invalid parameters or missing required fields |
401 | invalid_api_key | Missing or invalid API key |
429 | rate_limit_exceeded | Request rate or quota limit exceeded |
500 | server_error | Internal server error; retry later |
Error response example
{
"error": {
"message": "Invalid API key provided",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}
Handling recommendations
401: check theAuthorizationheader and whether the key is valid429: retry with exponential backoff, or increase your quota500: record therequest id(if present) and contact support