Angular 2 Http response generic error handler
<p>I'm implementing an Angular 2 app which will make some API calls. I was wondering if is there anyway to make a generic error handler. For instance, I want to redirect users to the login route if the API responds with a 401 code. Is this posible? </p>

<p>Thanks</p>