Skip to content

@sentry/nextjs: ISR error handling documentation/capabilities #3662

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

Closed
4 of 5 tasks
chris-erickson opened this issue Jun 9, 2021 · 2 comments
Closed
4 of 5 tasks
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@chris-erickson
Copy link

Package + Version

  • "@sentry/nextjs": "6.5.1",

Description

Can this capture React errors in Next.js, during Incremental Static Regeneration phases? The docs for configuring/verifying are for client-side, or server-side (API functions) but don't really address this hazy middle ground. What I have is basically a runtime error in React code ie, Cannot read property 'something' of undefined which when running in Netlify, responds with a 502 error and a json stack trace.

{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'something' of undefined","trace":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'something' of undefined","    at process.<anonymous> (/var/runtime/index.js:35:15)","    at process.emit (events.js:314:20)","    at processPromiseRejections (internal/process/promises.js:209:33)","    at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}

I have sentry configured per the instructions but a) don't get any events in sentry, and b) don't really even know where to start. Wondering if this is addressed more specifically someplace or there's any guidance how to work this out?

Ideally I'd return a 502 error page to the user, either as a generic error page or whatever a typical client-side rendered React page would do upon this type of error (either crash the app, or using Error Boundaries etc to contain it a bit) so that client-side Sentry catches it as usual.

@iker-barriocanal
Copy link
Contributor

Related to #3543

@lforst
Copy link
Contributor

lforst commented Jan 7, 2023

Closing as we support performance and error reporting in data fetchers now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
None yet
Development

No branches or pull requests

4 participants