-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(nuxt): Use Nuxt error hooks instead of errorHandler to prevent 500 #13748
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
// Check if the current `app.config.errorHandler` is explicitly set by the user before calling it. | ||
if (typeof originalErrorHandler === 'function' && app.config.errorHandler) { | ||
(originalErrorHandler as UnknownFunc).call(app, error, vm, lifecycleHook); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: I guess technically, we don't need this check here for Nuxt, right? Given we don't attach the error handler anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this part is not related to Nuxt anymore. But I thought it still make sense to check if currently there is an error handler attached.
Co-authored-by: Lukas Stracke <[email protected]>
Adds a new option
attachErrorHandler
to thevueIntegration
. This option is used in the Nuxt SDK to prevent wrapping the existing Nuxt error handler. Instead, the errors are captured in the Nuxt hooks.fixes: #12515