content_contains_specified_string

The rendered page contained content that the failure policy rejects.

target contentHTTP 500terminalnever billed

Common causes

  • · `fail_if_content_contains` was set and the rendered text contained one of the forbidden strings.
  • · The page rendered an error, paywall or consent screen instead of the content.
  • · The pattern is broader than intended — the check is a case-sensitive substring of the body text.

What to do

  • · Treat the failure as the signal it is: the artifact would have shown the wrong page, and it cost you nothing.
  • · Narrow the string so ordinary copy cannot trip it — `Error 404` is safer than `error`.
  • · Pair it with `wait_for_selector` so the check runs against the finished page rather than a loading state.

Response shape

HTTP 500
{
  "is_successful": false,
  "error_code": "content_contains_specified_string",
  "error_message": "The rendered page contained content that the failure policy rejects.",
  "documentation_url": "https://api.pagecapture.dev/docs/errors/content_contains_specified_string",
  "request_id": "req_01..."
}