Within my Vue2 application, I am seeking a method to capture global Vue errors and transmit them to a logging or monitoring service such as Sentry.
After attempting to overwrite the global error handler of Vue, I noticed that console logs were no longer appearing. Is it feasible to attach to the global error handler rather than replacing it entirely?
const plugin: PluginObject<never> = {
install(Vue: typeof _Vue): void {
Vue.config.errorHandler = (err, vm, info) => {
// integrating with Sentry
}
})
}