-
-
Notifications
You must be signed in to change notification settings - Fork 5k
onError is undocumented #1973
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
Comments
Why was this closed? I've just been dealing with this exact same issue in vue-router 3.0.1 and can assure you it is not fixed. The documentation covers onError here: https://router.vuejs.org/api/#router-onerror but there is absolutely no mention of any expected usage, and it even suggests that it is purely a no-argument callback that you must provide. I see from examples and discussions on-line that people treat it as a callback that is to take some sort of error parameter when it is called, but the documentation is completely silent on the matter. This is all it says: router.onErrorSignature: router.onError(callback) Register a callback which will be called when an error is caught during a route navigation. Note for an error to be called, it must be one of the following scenarios:
|
Agree with @kwbskf here - the documentation could be more specific as to what's expected here. For anyone else coming to this issue: I don't unfortunately have time right now to navigate the type ErrorHandler = (err: Error) => void
onError(cb: ErrorHandler): void |
Version
3.0.1
Reproduction link
https://router.vuejs.org/en/installation.html#
Steps to reproduce
Look at the docs
Try to find a mention of
onError
that describes appropriate usage.Fail to find it.
What is expected?
Documentation of this method
What is actually happening?
Documentation of this method is not present
The text was updated successfully, but these errors were encountered: