Not able to get global errorHandler work vue2 #11689
Unanswered
praveshishere
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Vue2
I was trying to implement an optional error capturing mechanism somehow, where if an api throws an error, I can catch it either in the component if required else the global error handler catches it and shows a warning toast or something.
For some reason it was working fine before, I don't how what is broken but it doesn't work now for me, In my project global error handler catches an error thrown in created but does not catch one if it is thrown in loadData
Reproduction
https://stackblitz.com/~/github.com/praveshishere/vue_errorHandler?file=src%2FApp.vue
errrorHandler
Case 1 - I throw error in loadData, it is not caught
Case 2 - I throw error in created, it gets caught by global errorHandler
Beta Was this translation helpful? Give feedback.
All reactions