Open
Description
Version
3.0.3
Reproduction link
https://jsfiddle.net/orzwg537/
Steps to reproduce
Run the fiddle and look in console
What is expected?
a message saying error caught
What is actually happening?
There is an Unhandled Promise rejection instead
Currently, errors thrown in guards are caught by router.onError but Promises rejections (or error thrown in an async
function) are not caught. This should be handled in all the other guards as well. To handle them right now it is possible by passing the error to next
:
try {
await fetchdata()
} catch (error) {
next(error)
}