Skip to content
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

[Next.js] Emit a warning when the user has not configured onRequestError on Next.js versions that support it #15049

Open
lforst opened this issue Jan 17, 2025 · 1 comment
Labels
Meta: Good First Issue Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@lforst
Copy link
Member

lforst commented Jan 17, 2025

Description

Next.js 15 added onRequestError which allows for deeper instrumentation for errors.

If people upgrade there is nothing telling them to add export const onRequestError = Sentry.captureRequestError; as per our setup guide and wizard: However, it would be very important to do so.

We should add a warning when Next.js builds or in dev mode when onRequestError is missing so that people add it. Only when we are on Next.js >= 15 though

@lforst lforst added Package: nextjs Issues related to the Sentry Nextjs SDK Meta: Good First Issue labels Jan 17, 2025
@lforst
Copy link
Member Author

lforst commented Jan 17, 2025

@a-hariti this may be another good one to tackle if you want to familiarize yourself with the SDK a bit!

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

No branches or pull requests

1 participant