Version: 1.0
Canvasflare API
General Error Codes
Here is a summary of common error codes you may encounter while using the API:
- 400 Bad Request: The request parameters are invalid. Ensure your data is correctly formatted.
- 401 Unauthorized: The API key is missing or invalid. Verify your API key.
- 403 Forbidden: Access to the resource is denied.
- 404 Not Found: The requested resource cannot be found.
- 429 Too Many Requests: You've exceeded the allowed number of concurrent requests or your monthly quota.
- 500 Internal Server Error: The server encountered an error while processing your request.
- 503 Service Unavailable: The API is temporarily unavailable due to overload or maintenance.
Example Error Responses
The request could produce an error because of an internal issue, incorrect parameters, or when the limit has been exceeded. Our screenshot API adheres to the HTTP status code conventions and provides a JSON response in case of an error:
{
"statusCode": "status_code",
"code": "error_code",
"message": "An error message.",
}
Codes with explanations
| Error code | Status Code | Explanation |
|---|---|---|
| err_request_not_valid | 400 | One of your request parameter is invalid. |
| selector_not_found | 400 | Unable to locate requested selector. |
| network_error | 400 | The error occurs when the API can't connect to theprovided URL, which may indicate that the site is blocking the API or is temporarily unavailable. Retry your request. |
| api_key_missing_or_invalid | 401 | API key query param is missing or invalid |
| quota_exceeded | 429 | You've reached the monthly API call limit. Consider upgrading your current plan or wait for the next reset. |
| concurrency_limit_exceeded | 429 | You have exceeded the allowed number of simultaneous requests. |
| internal_server_error | 500 | The API failed to process your request. You can safely retry the request. We have been notified about the issue and are working to resolve it as quickly as possible. |
| timeout_error | 500 | The screenshot couldn't be captured within the specified timeout period. This may be because the site is slow to respond or rendering is taking longer than anticipated. |
| temporary_unavailable | 503 | The API is temporarily unavailable due to an error or overload. Please wait a moment before safely retrying your request. |