I have a working angular interceptor service which redirects to a log in page on a 401 response being received from a service call
The issue is that the 401 is still shown as a JavaScript error in the Google Chrome console
GET http://domain:port/api/url 401 (Unauthorized) ... angular.js:9658
Is this a feature of chrome, or do I need to handle this in another way?
The contents of my working interceptor service is as follows
var _request = function (config) {
/*insert auth headers*/
}
var _responseError = function (rejection) {
if (rejection.status === 401) {
$location.path('/login');
}
return $q.reject(rejection);
}
var _response = function (response) {
return response || $q.when(response);
}
Thanks in advance for any help