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

fix(nextjs): Don't capture not-found and redirect errors in generation functions #10057

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

lforst
Copy link
Member

@lforst lforst commented Jan 4, 2024

Fixes #10038

@lforst lforst merged commit 366ed0b into develop Jan 5, 2024
59 checks passed
@lforst lforst deleted the lforst-dont-report-404s-and-300s branch January 5, 2024 09:23
c298lee pushed a commit that referenced this pull request Jan 9, 2024
@karlkeefer
Copy link

@lforst thanks for adding this!

This PR appears to address NEXT_REDIRECT errors in generateMetadata(), but they can also be called in the regular component render logic. That's how it's illustrated in the nextjs docs.

Here's an example error using "@sentry/nextjs": "^7.93.0" which appears to include this fix already.

Am I missing something? Would it be useful to spin up a new issue for this?

Cheers 🥂

@lforst
Copy link
Member Author

lforst commented Jan 16, 2024

@karlkeefer Thanks for raising! Looks like that error originated from the Next.js dev tools in the browser. The not-so-bad news is that you will not create these issues in your production environment.

I will get around to fixing this soon but not immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Next.js] Don't report redirect and not-found errors for generation functions.
3 participants