-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
onError does not capture errors thrown in redirect callback #3201
Comments
FYI, the error will still be thrown/rejecetd by |
Makes sense. The issue is now, for ssr, if you just want to use onError to manager errors and add a push().catch(noop) to swallow rejections, a thrown error in the redirect callbacks leaves you hanging. |
I'm also interested in this. Would you accept a pull request for this feature? |
yes, go ahead |
posva
pushed a commit
that referenced
this issue
Jul 3, 2020
…3251) * feat(errors): capture errors thrown in redirect callback in onError Resolves #3201 * feat(errors): capture errors thrown in redirect callback in onError try catch just router.match Resolves #3201 * feat(errors): capture errors thrown in redirect callback in onError remove unnecessary if Resolves #3201 Co-authored-by: Raul Cabello <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.1.6
Reproduction link
https://codepen.io/trainiac/pen/rNOZvRO?editors=1112
Steps to reproduce
What is expected?
When router.push('/oldpath/test'). an error is throw becuase there is no oopsmistake property on the to route. This should be caught in router.onError.
What is actually happening?
It's only caught in router.push('/oldpath/test').catch(err is here)
The text was updated successfully, but these errors were encountered: