Skip to content

Re-registration fails with 'No valid x402 response found' but server-side probe is blocked by Cloudflare #742

@rhlsthrm

Description

@rhlsthrm

Issue

Re-registering an existing server via the registration UI fails with:

{
  "success": true,
  "registered": 0,
  "failed": 4,
  "source": "openapi",
  "failedDetails": [
    { "url": "https://api.leoclaw.cc/analyze", "error": "No valid x402 response found", "status": null },
    { "url": "https://api.leoclaw.cc/product-id", "error": "No valid x402 response found", "status": null },
    { "url": "https://api.leoclaw.cc/ad-debunk", "error": "No valid x402 response found", "status": null },
    { "url": "https://api.leoclaw.cc/verify", "error": "No valid x402 response found", "status": null }
  ]
}

Context

  • Server: https://api.leoclaw.cc
  • The client-side preview (in the registration UI) correctly detects the server title, description, and all 4 resources before submission
  • The server-side probe (from x402scan backend) gets status: null — the request itself fails, not a parsing issue
  • All 4 endpoints return proper x402 v1 challenge responses ({x402Version: 1, error, accepts: [...]}) when probed externally
  • /.well-known/x402 and /openapi.json are both live and correct
  • The @agentcash/discovery CLI tool detects all 4 endpoints successfully

Root cause hypothesis

The server is behind a Cloudflare Tunnel. Cloudflare's Bot Fight Mode or automated request blocking may be returning a JS challenge page to x402scan's server-side HTTP client (which can't execute JavaScript), while browser-based requests succeed normally. status: null is consistent with a network-level block or non-parseable response.

Request

  1. Could you expose the actual HTTP status + response body in failedDetails to help diagnose? Currently status: null gives no signal.
  2. Is there a known list of x402scan scraper IPs or User-Agents that could be allowlisted on the server side?
  3. Is re-registration the intended mechanism for updating server metadata (title/description), or is there another path?

Verification

Direct probe works fine:

curl -s -X POST https://api.leoclaw.cc/analyze \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com"}' | jq .x402Version
# → 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions