Next.js App Router with Turbopack: route handler error not captured
Closed this issue · 5 comments
Related: #8105
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/nextjs
SDK Version
10.12.0
Framework Version
Next 15.5.3
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/KirillTregubov/nextjs-sentry-demo
This repo was generated by following this quick start followed by this step in the Sentry Next.js docs
Steps to Reproduce
- Clone repo
- Install dependencies (I used
bun i) - Create an
.envfile and provideSENTRY_AUTH_TOKEN=inside it. - Run the
devscript and add the--turboflag (I usedbun dev --turbo) - Send a request to http://localhost:3000/api/sentry-example-api (I navigated using my browser)
Expected Result
Thrown SentryExampleAPIError("This error is raised on the backend called by the example page.") in the route handler is captured.
Actual Result
Error does not show up in the Sentry dashboard.
Additional Context
The error is properly captured when run without Turbopack. Repeat the following steps:
4. Run the dev script (I used bun dev)
5. Send a request to http://localhost:3000/api/sentry-example-api (I navigated using my browser)
You will notice that the error properly shows up in the dashboard.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Hey @KirillTregubov thanks for reaching out.
The fix already merged from Vercel but so far only released in next@15.5.1-canary.25.
closing as duplicate of #17512
@chargome can you please clarify as your comment is confusing and we're unsure if this support is actually coming or not. You're saying its backdated in an old canary of an old version and didn't make it into the release of 15.5.1, 15.5.2, or 15.5.3? Did you mean to type 15.6 canary?
@swiecki Vercel released the fix already in next@15.5.1-canary.25 but not on any stable release.
It will be included in next@15.5.4