I am using Angular 2.1.2.
I have an authentication token (using angular2-jwt) and if it expires my webApi call fails with a 401 error. I am looking for a solution where
Well, reloading is simple: (
It is good idea to show login/password popup and allow user to continue working if he can provide password, if user hits cancel just do redirect to login page.
There are also connection problems, timeouts, server errors. The problem is that it is difficult to reliably implement proper handling using Angular 2 Http
module and rxjs
. Personally, i gave up using Http
module, because its error handling has bad design and implemented my own http module, which allows configurable error handling and transparent retries.