Michael Karén
1 min readSep 12, 2019

--

OK, I understand what you mean now Kanishka Madhuni.

If you catch the error you will have to re-throw it.
But, you can just omit the catch clause unless you have something very specific in that call you need to do.

So if you remove `(err: any) => { throw err; }` the error will pass through to your global error handler.

--

--

Michael Karén
Michael Karén

Written by Michael Karén

Frontend Architect • JavaScript Enthusiast • Educative.io Author • ngVikings organizer.

No responses yet