I believe you're pushing your interceptor to the wrong place. The $http docs indicate that you should be pushing onto:
$httpProvider.interceptors
rather than:
// I can only find references to this on old tutorials, so maybe it's been deprecated
$httpProvider.responseInterceptors
So you'd have something like:
$httpProvider.interceptors.push(function($q) {
return {
'response': function(response) {
if (successResponse.config.method.toUpperCase() !== 'GET') {
console.info('success');
}
return response || $q.when(response);
},
'responseError': function(response) {
switch (response.status) {
case 401:
console.info('wrong usename or password');
break;
case 403:
console.info('no rights to do this');
break;
case 500:
console.info('server internal error: ' + response.data);
break;
default:
console.info('error ' + response.status + ': ' + response.data);
}
return $q.reject(response);
}
};
});
working plnkr: here