-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Instrument Next.js App Directory error.js
files
#7181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Any updates on this? I suppose errors and not being bubbled to the document, cause the whole idea is to contain them within the boundaries. However, is there any waay to manually report error from client-side, using sentry/nextjs SDK? |
@rapidfixer |
For us Sentry.captureException does nothing from the server side... Client-side works perfect Tried both with custom server.ts and not. Tried
Still nothing in Sentry though |
@studentIvan can you please open a new issue with proper reproduction steps and your setup? Thanks! Please also include what you mean by custom server.ts. Thanks! |
error.js
files
Update: I have tried experimenting with auto-wrapping error components and got it working (#9726) however I soon realized this doesn't make sense UX-wise. If Next.js users set up Additionally we follow the same pattern of not auto instrumenting these sort of error boundaries in other SDKs (Sveltekit, Remix, even React error boundaries are not automatically instrumented). We added docs for what users can do to report errors caught by |
Problem Statement
We are currently not instrumenting Next.js 13 error boundaries in any way.
Solution Brainstorm
First, we need to check if Next.js error boundaries prevent errors from bubbling up to the global error handler, if so, we should provide a (n automatic) wrapper that captures caught errors.
If it doesn't prevent the errors from bubbling up we most likely do not care because our global handlers will capture them.
The text was updated successfully, but these errors were encountered: