Error Codes
The ReviewData API uses standardized error codes to communicate the status of your requests and tasks.
Task Status Codes
- 200 OK: Request processed successfully
- 201 Created: Resource created successfully
- 400 Bad Request: Invalid request format or missing required fields
- 401 Unauthorized: Invalid or missing API key
- 404 Not Found: Resource not found
- 422 Unprocessable Entity: Request validation failed
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Unexpected server error
- 503 Service Unavailable: Service temporarily unavailable
- 504 Gateway Timeout: Request timeout
When an error occurs, the API returns a standardized error response:
{
"error": "Error message description",
"details": {
"field_name": ["Specific validation error"],
"api_key": ["The provided API key is invalid"]
}
}Handling Errors
Best Practices
- Always Check Status Codes: Verify both HTTP status codes and task status codes
- Implement Retry Logic: For transient errors (5xx), implement exponential backoff
- Log Error Details: Store error responses for debugging and monitoring
- Handle Partial Success: Some tasks may complete partially (codes 530, 532)
Retry Strategy
// Example retry logic for transient errors
const retryableErrors = [500, 503, 504];
const maxRetries = 3;
if (retryableErrors.includes(response.status)) {
// Implement exponential backoff retry logic
await delay(Math.pow(2, attempt) * 1000);
// Retry request
}Monitoring
Monitor these error patterns:
- High rate of 401 errors (authentication issues)
- Frequent 429 errors (rate limiting)
- 500+ errors (server issues)
- Publisher-specific errors (450, 451, 472)
Support
If you encounter persistent errors:
Updated 2 months ago
