-
-
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(vue): Remove logError
from vueIntegration
#14958
Conversation
size-limit report 📦
|
packages/vue/src/errorhandler.ts
Outdated
@@ -30,27 +30,15 @@ export const attachErrorHandler = (app: Vue, options: VueOptions): void => { | |||
setTimeout(() => { | |||
captureException(error, { | |||
captureContext: { contexts: { vue: metadata } }, | |||
mechanism: { handled: false }, | |||
mechanism: { handled: !!originalErrorHandler, type: 'vue-errorHandler' }, |
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.
Typically we just use the framework name as the mechanism type, so:
mechanism: { handled: !!originalErrorHandler, type: 'vue-errorHandler' }, | |
mechanism: { handled: !!originalErrorHandler, type: 'vue' }, |
We have a brief comment about this in relay, but I'll make a PR to develop to make this more clear.
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.
That's my "bad" - I didn't know that this was more than coincidence in the places where we set a custom type
. Thanks for pointing this out and develop sounds good!
* When set to `true`, original Vue's `logError` will be called as well. | ||
* https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48 | ||
*/ | ||
logErrors: boolean; |
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.
I wonder if there is an easy way to deprecate this in v8
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.
I deprecated it in this PR: #14943
Removes
logError
and always re-throws the error when it's not handled by the user.PR for v8 (without removing
logError
): #14943Logging the error has been a problem in the past already (see #7310). By just re-throwing the error we don't mess around with the initial message and stacktrace.