{
  "id": 14166997,
  "title": "A stranger cannot reach our 404 page, and three of our four error screens report to nobody",
  "url": "https://urgent.news/2026/10/13/a-stranger-cannot-reach-our-404-page-and-three-of-our-four-error",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-13T09:43:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/a-stranger-cannot-reach-our-404-page-and-three-of-our-four-error-screens-report-to-nobody-507e"
  },
  "original_language": "en",
  "account": "A request sent to an invalid URL on the pub-trivia.app website yields different results depending on the path. While one URL receives a proper 404 error page, another triggers a redirect to a login screen. This discrepancy occurs because the site uses an auth gate that only allows public paths to pass through to the framework. If a path does not match any existing routes, it is treated as private and redirected to the login page with a next parameter, causing the user to potentially arrive at an incorrect location after signing in.\n\nFour distinct error pages exist within the application, each designed to provide a unique message to users. The not-found.tsx page, which handles cases when a requested page does not exist, is the simplest with just 20 lines of code. It features a heading, a brief explanation, and a link back to the homepage. The global-error.tsx page, responsible for errors encountered at the root layout level, is more complex with 60 lines of code. It includes inline styles and an error reporter that sends an Error ID when available. The dashboard/error.tsx and play/error.tsx pages are targeted at signed-in users experiencing issues within the app or on their phone while playing a game. These pages provide clearer context and instructions tailored to the user's specific situation, such as checking their connection or reloading the page.",
  "summary": "Try this against our site. Two URLs that do not exist, two different answers: curl -sI https://pub-trivia.app/guides/not-a-real-guide | head -1 # HTTP/2 404 curl -sI https://pub-trivia.app/not-a-real-guide | grep -iE \"^(HTTP|location)\" # location: /login?next=%2Fnot-a-real-guide Same site, same build, same nonsense path on the end. One gets our 404 page. The other gets a 307 to a login screen it…",
  "key_points": [
    "Invalid URL paths yield different error responses",
    "Auth gate restricts public paths to login screen",
    "Four error pages each with unique user messages"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}