Skip to content

Conversation

@sergical
Copy link
Member

@sergical sergical commented Jan 8, 2026

Summary

  • Create dedicated /capturing-errors page for Next.js with SplitLayout pattern
  • Cover all Next.js error handling patterns: error boundaries, Server Actions, API routes, middleware
  • Add best practices and troubleshooting sections
  • Redirect /usage/capturing-errors

Test plan

  • Verify page renders correctly at /platforms/javascript/guides/nextjs/capturing-errors/
  • Verify redirect works from /platforms/javascript/guides/nextjs/usage/
  • Verify only one "Capturing Errors" item in Next.js sidebar
  • Check all internal links work

🤖 Generated with Claude Code

- Create dedicated capturing-errors page for Next.js with SplitLayout
- Cover error boundaries, Server Actions, API routes, middleware
- Add best practices and troubleshooting sections
- Exclude common usage page from Next.js (uses dedicated page)
- Add redirect from /usage to /capturing-errors

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@linear
Copy link

linear bot commented Jan 8, 2026

DEVEX-226 Errors

@vercel
Copy link

vercel bot commented Jan 8, 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 8, 2026 9:19pm
sentry-docs Ready Ready Preview, Comment Jan 8, 2026 9:19pm


### Route Handlers

Errors in API Route Handlers are automatically captured. For custom error responses, catch and report manually.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we trying to demonstrate how to extend this functionality with another example of where to use captureException?

I'm noticing you aren't adding more information for unhandled exceptions in client-side code, or unhandled promise rejections from the list of things Sentry automatically captures.

If you do want to keep this section, I think it needs a bit more reasoning around why you're bringing it up.

</SplitSection>
</SplitLayout>

## Manual Capture
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this section different from the others? It seems like this whole guide is about manual capture?

</SplitSection>
</SplitLayout>

## Best Practices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, but it also feels a little repetitive. I wonder if this just gets added to the sections where you already talk about these things - for example global settings vs at a path level?

Otherwise, this might be better as a TL;DR, instead of having more examples? Only because it elongates the page an awful lot. I love me some best practices though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have this conviction that docs are more and more consumed by LLMs. And not so much in a way that is copy ai rules to an llm but literally copy and paste the url to an agent. we do the conversion to markdown already, and this structure imo gives the LLMs a better chance of parsing and setting things up properly.

I could be completely wrong tho, definitely open to more feedback, cause yeah, i do understand that it extends the page in length, but for LLMs its a good thing (i think?lol) and for devs we have the sidebar with sections to skim and jump to the right part, if they are on this page, the assumption is they are here for a reason, and have it be a manual with more context than less.

Just an opinion though, absolutely not set in stone

Copy link
Contributor

@sfanahata sfanahata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta comment: This is really good! I think we could do something similar to clean up the inherited common version of this page too, to streamline in some ways.

I think we could be a bit more precise with when and why we're talking about using certain functions/options in order to further streamline this page.

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.

3 participants