-
Notifications
You must be signed in to change notification settings - Fork 113
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
Throwing inside an async asyncData hook causes headers to be sent twice #278
Comments
The output you are getting (a simple HTML page with a I can't help more without having a look at repo that reproduces. |
@rchl this HTML output is specifically what node's |
I can't reproduce that. I'm getting a normal Nuxt error and the error is also reported to Sentry correctly. Maybe try adding I can only think of this happening when there is some failure to report the error to Sentry that would make the app crash before reaching the normal error handler. |
hey @rchl I didn't get around to looking into this, so I'm going to close this issue for now. Still, thank you for your time! |
Version
@nuxtjs/sentry:
5.0.2
nuxt:
2.15.1
Sentry configuration
Default config
Reproduction Link
Cannot really reproduce yet
Steps to reproduce
asyncData
hook that throws an errorWhat is Expected?
The error is caught, Nuxt's error handler catches it and displays the Youch error page in development or the
error.html
template in production.What is actually happening?
A response seems to be sent prematurely, as indicated by the following error reported on the console:
Therefore, the default node HTTP handler error output is sent to the browser (I cannot determine which is the first response generated, presumably the one by Node itself):
Could this be related to #245? I noticed the error only appears if the sentry module is enabled in the nuxt configuration.
The text was updated successfully, but these errors were encountered: