Host Returned Error
It is an API error returned when the host server does not respond with a successful status code within the range of 200-299.
Reasons and how to fix
Host Returned Non-Success Status Code
The most common reason for the “host_returned_error” error is that the host server returned a status code outside the 200-299 range, indicating an unsuccessful response.
To fix this, you can:
- Check host server status: Ensure the host server is operational and capable of returning a successful status code.
- Review site response: Investigate the response from the host server to understand why it is not returning a successful status code.
Forcing Screenshot of Error Pages
If you want the API to take a screenshot of the error page even when the host returns an error, you can use the ignore_host_errors
option.
To fix this, set ignore_host_errors
to true
in your API request:
Retrieving the Returned Status Code
You can get the status code returned by the host server by reading the returned_status_code
field in the response. This will help in diagnosing and understanding the nature of the error.
Reach out to support
If you continue to face issues or need further assistance, please reach out to support@screenshotone.com
, and we will assist you as soon as possible.