Open
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
9.32.0
Framework Version
next 15
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Nest your global-error.js within a dynamic route.
E.g:
└── app
└── [locale]
├── global-error.js
Expected Result
If you use something like next-intl the recommendation is to nest global-error.js inside [locale] so that it can get translated as well.
Unfortunately, when doing so Sentry SDK does not seem to detect it and outputs this warning:
web:build: warn - It seems like you don't have a global error handler set up. It is recommended that you add a global-error.js file with Sentry instrumentation so that React rendering errors are reported to Sentry.
Read more: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#react-render-errors-in-app-router (you can suppress this warning by setting SENTRY_SUPPRESS_GLOBAL_ERROR_HANDLER_FILE_WARNING=1 as environment variable)
--
<br class="Apple-interchange-newline">
I expect sentry SDK to detect that global-error.js exists and not give me a warning.
Actual Result
web:build: warn - It seems like you don't have a global error handler set up. It is recommended that you add a global-error.js file with Sentry instrumentation so that React rendering errors are reported to Sentry. Read more: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#react-render-errors-in-app-router (you can suppress this warning by setting SENTRY_SUPPRESS_GLOBAL_ERROR_HANDLER_FILE_WARNING=1 as environment variable)
--
```
<br class="Apple-interchange-newline">
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Community