Skip to content

Conversation

@seer-by-sentry
Copy link
Contributor

DESCRIBE YOUR PR

The root cause analysis for DOCS-9WX identified that the Page Server Component (/[[...path]]) was throwing an unhandled error when a request for a valid slug (like /changelog) was made, but the corresponding MDX source file was not found at runtime.

This happened because getFileBySlug() in src/mdx.ts was throwing a generic Error object without a .code property when it failed to find a source file. The page.tsx component's catch block, however, specifically checks for e.code === 'ENOENT' to gracefully return notFound(). Since the error lacked this property, it was re-thrown and became an unhandled error.

This fix modifies getFileBySlug() to attach code: 'ENOENT' to the error object when a source file cannot be found. This ensures that the page.tsx component can correctly identify and handle the "file not found" scenario, preventing unhandled errors and returning a proper 404 response.

Resolves DOCS-9WX

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
develop-docs Ready Ready Preview, Comment Jan 15, 2026 11:09pm
sentry-docs Ready Ready Preview, Comment Jan 15, 2026 11:09pm

Review with Vercel Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants