Error Handling
Learn about Invaro API error codes and handling
When an error occurs, the API will return an appropriate HTTP status code along with a JSON response containing error details.
Error Response Format
All error responses follow this format:
Common Error Codes
Code | Description | HTTP Status |
---|---|---|
UNAUTHORIZED | Authentication failed | 401 |
INVALID_REQUEST | Malformed request | 400 |
RATE_LIMIT_EXCEEDED | Too many requests | 429 |
VALIDATION_ERROR | Request validation failed | 400 |
INTERNAL_SERVER_ERROR | Server error | 500 |
Example Error Scenarios
Authentication Error
Rate Limit Error
Validation Error
Error Categories
Retryable Errors
These errors are temporary and can be resolved by retrying the request after a delay:
-
Rate Limit (429) Exceeded request limits
-
Gateway Errors
- Bad Gateway (502)
- Service Unavailable (503)
- Gateway Timeout (504)
-
Processing Failures Temporary processing issues
Non-Retryable Errors
These errors require fixes before retrying:
-
Authentication (401, 403) Invalid or unauthorized API key
-
Validation (400) Invalid request parameters
-
Not Found (404) Resource doesn’t exist
-
Processing Failures Permanent processing errors
HTTP Status Codes
Successful requests
Client errors
Server errors
Error Handling Best Practices
1. Check Success Flag
Always check the success
field in the response:
2. Implement Retry Logic
Implement exponential backoff for retryable errors:
3. Handle Rate Limits
Respect rate limit headers and implement backoff:
4. Log Errors
Implement proper error logging:
Support
If you encounter persistent errors or need assistance:
- Email: support@invaro.ai
- Status Page: status.invaro.ai