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

  1. Always Check Status Codes: Verify both HTTP status codes and task status codes
  2. Implement Retry Logic: For transient errors (5xx), implement exponential backoff
  3. Log Error Details: Store error responses for debugging and monitoring
  4. 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:

  1. Check this documentation for error code meanings
  2. Verify your request payload format
  3. Contact support at with:
    • Error code and message
    • Request payload (with API key redacted)
    • Task ID if available
    • Timestamp of the error