I'm trying to write a generic error handler for my website using $http'
s interceptors but they don't seem to be able to do what I want to do.
I placed interceptors on 'response'
and 'responseError'
but they never get called when the server is offline/not reponding (net::ERR_CONNECTION_REFUSED). I understand why this happens, there's no response to intercept.
I'd like to know if there's a generic way of catching these errors, other than listening to the $httpPromise
's error
callback for each request.