Error Codes
Complete reference for all error codes and how to handle them.
HTTP Status Codes
| Status Code | Error Code | Description | Solution |
|---|---|---|---|
400 | missing_parameter | Required parameter is missing | Include all required parameters (url, params) |
400 | invalid_url | Invalid URL format | Ensure URL is a valid HTTP/HTTPS URL |
400 | invalid_category | Invalid category in params | Use only valid categories from the allowed list |
401 | invalid_api_key | Invalid or missing API key | Check your API key in the Authorization header |
403 | forbidden_category | Category not allowed for your plan | Upgrade to Premium or use allowed categories |
429 | rate_limit_exceeded | Rate limit exceeded | Wait for the retryAfter period or upgrade plan |
500 | internal_error | Internal server error | Retry the request or contact support |
Error Response Examples
Rate Limit Error (429)
Loading code...
Handling Rate Limits
Check the
retryAfter field (in seconds) and wait before retrying. Consider implementing exponential backoff for better reliability.Invalid API Key (401)
Loading code...
Missing Parameter (400)
Loading code...
Invalid URL (400)
Loading code...
Error Handling Best Practices
Recommended Approach
- • Always check the
successfield in the response - • Handle rate limit errors (429) with retry logic and exponential backoff
- • Validate API key and parameters before making requests
- • Log errors for debugging and monitoring
- • Provide user-friendly error messages based on error codes
- • Check response headers for additional context (e.g., Retry-After)
PageSight