Matched Failed Request
This API error is returned when a resource URL matches a pattern in the fail_if_request_failed option and either:
- the request fails at the browser or network level; or
- the resource returns an HTTP status code from
400through599.
{ "is_successful": false, "error_code": "matched_failed_request", "error_message": "A request matched by the specified pattern by the `fail_if_request_failed` option has been failed. If it seems to be a mistake or not what you expected, please, reach out to `support@screenshotone.com` as quickly as possible, and we will assist and try to resolve your problem.", "documentation_url": "https://screenshotone.com/docs/errors/matched-failed-request/"}Reasons and how to fix
Section titled “Reasons and how to fix”You get this error because you specified the fail_if_request_failed option and a matching resource failed. This can indicate a temporarily unavailable asset, a cache or CDN inconsistency, or a persistent problem on the target website.
ScreenshotOne does not retry the API request automatically. If a temporary asset failure is acceptable in your use case, retry the same API request in your integration. If the matching resource still fails after your retry limit, treat the website as persistently broken.
If you do not want a failed resource to fail the rendering request, remove the parameter. For example, change:
https://api.screenshotone.com/take?access_key=<your access key>&url=https://example.com&fail_if_request_failed=*example.com*Make it like this:
https://api.screenshotone.com/take?access_key=<your access key>&url=https://example.comUse narrow wildcard patterns for resources that are essential to a valid screenshot. Broad patterns can also match optional or intentionally blocked resources.
Reach out to support
Section titled “Reach out to support”Also, if you encounter any issues or bugs, please reach out to support@screenshotone.com, and we will assist you as soon as possible.