Handle Promise rejection in guards #2833
Labels
feature request
fixed on 4.x
This issue has been already fixed on the v4 but exists in v3
has workaround
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 tonext
:The text was updated successfully, but these errors were encountered: