Skip to content

A 403 that carries proof of a bot challenge is reported as a generic block #446

Closed

Description

@nc9

Problem

applyStatusGuards (packages/crawler/src/fetcher.ts) checks a 503 for proof of a bot challenge (the cf-mitigated: challenge header, or a challenge interstitial in the body) and reports "Blocked by Cloudflare challenge (503)". A 403 gets no such check: it always becomes the generic "Request blocked by server", even when the response carries cf-mitigated: challenge or a challenge page.

The result is that a site behind a managed challenge that answers 403 cannot be told apart from a plain 403 (a login wall, a geo block, a misconfigured server), so the advice cannot name the mechanism. Inferring it from a Server: cloudflare header or from technology detection would be wrong; the proof has to come from the refused response itself.

Acceptance Criteria

  • A 403 carrying cf-mitigated: challenge is reported as a challenge with the provider named, the same way a 503 is
  • A 403 whose body is a challenge interstitial is reported the same way (reading at most a bounded prefix of the body)
  • A plain 403, including one with Server: cloudflare, stays the generic "Request blocked by server"
  • Tests cover all three

Activity

  1. added
    enhancement
    P3
    size: S
    on Oct 2, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Reproduced on 0.0.108 with local fixtures. A 403 with cf-mitigated: challenge, and a 403 whose body is a challenge interstitial, both end with status blocked and Site blocked the crawler (bot protection / auth / rate limit): Request blocked by server, the same as a plain 403 with Server: cloudflare. The 503 control with cf-mitigated: challenge gives Blocked by Cloudflare challenge (503).

    origin/main still has this in packages/crawler/src/fetcher.ts: applyStatusGuards fails every 403 before the challenge checks, and the standard fetch path only reads the body for a 503 before calling it, so the body check needs that read extended to 403 as well.

  3. added a commit that references this issue on Oct 24, 2026
    0837ce6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancementsize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions