Here's the scenario (AngularJS v1.3.15):
$httpProvider.interceptors.push(function($rootScope) {
return {
'responseError': function(rejection) {
//...some custom data checking
console.log('error #1');
return rejection;
}
};
});
and now, I send the query to the server using the $resource (which returns the 404 error, which is desired in that case), and I return the $promise:
var promise = controller.sendCustomQuery();
promise.catch(function (response) {
console.log('error #2');
}
);
and in the console I can only see the message error #1 and no error #2. Why ?