Documentation links that were only broken from CI

The first scheduled link check reported 14 broken Razorpay links. They load from Europe but answer 404 to GitHub-hosted runners.

Status
Mitigated
Project
PandaPayLens
Found
Found

Symptoms

14 Razorpay documentation links were reported broken on the first scheduled run of the monthly link check.

Expected and observed behavior

Expected
A link check fails only for pages that are actually gone.
Observed
The same 14 pages returned 200 from a client in Europe. They are India-only pages; Razorpay answers 404 to GitHub-hosted runners for exactly those pages, while 26 other Razorpay pages pass.

Root cause

The response depends on where the request comes from. A 404 from this host is not evidence that the page is missing.

Resolution

A 404 from hosts known to answer by region is reported as unverified instead of broken (pull request #71). A 410, an unresolved host and a redirect to a "page not found" page still fail for every host.

JavaScript
const REGIONAL_HOSTS = new Set(["razorpay.com"]);
// ...
if (res.status === 404 && REGIONAL_HOSTS.has(new URL(url).hostname))
  return { kind: "unverified", detail: "404, regional host" };

Validation

Actions run 40278468636 checked 937 links: 0 broken, 44 unverified.

Remaining limitations

A Razorpay page that really disappears and answers 404 would be reported as unverified, not broken, until it is checked from a browser.

GitHub references

More

Theme