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): Log false positive warning only if request is unfinished. #6070

Merged
merged 1 commit into from Oct 28, 2022

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Oct 27, 2022

Closes: #3852

Looks like #3852 is resolved by #5778, which is published with 7.14.0.

We have been logging a warning to point out that Next.JS's warning is a false positive, but it seems not necessary anymore unless the user prefers disabling auto-wrapping and uses withSentry wrapper manually.

This PR updates the warning message and ensures it's only logged when the request is not yet finished, before the result is returned.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Can we say we can close #3852 after this gets merged then?

@onurtemizkan
Copy link
Collaborator Author

Can we say we can close #3852 after this gets merged then?

I think so 👍

@AbhiPrasad AbhiPrasad merged commit c6bdbfd into master Oct 28, 2022
@AbhiPrasad AbhiPrasad deleted the onur/next-res.end-warning branch October 28, 2022 10:10
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.

[@sentry/nextjs] Errored API routes trigger "API resolved without sending a response"
2 participants