-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
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/nextjs
SDK Version
^8
Framework Version
No response
Link to Sentry event
https://tabtick.sentry.io/issues/369364/events/c792870db01e4425b2076500da9333af/
SDK Setup
sentry.server.config.ts
Sentry.init({
dsn: process.env.SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development',
});Steps to Reproduce
- have a next application with ppr enabled
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
ppr: true,
},
}
module.exports = nextConfig- have a request importing
next/headerslikecookies(),headers()
Expected Result
From next.js docs this is normal, and we shouldn't caught it
https://nextjs.org/docs/messages/ppr-caught-error
Actual Result
Sentry catches errors for routes that use ppr.
This is the error description:
Route /location/les-caves-du-roy-nightclub needs to bail out of prerendering at this point because it used headers. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs...

Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
No status