My angular app doesn't handle the errors in $http calls.
I have a $httpProvider where I return $q.reject(response) in errorResponse as required by documentation. In the console the angular just puts angular.min.js:99 GET http://localhost:8080/my/api 500 (Internal Server Error).
Code
console.log('before');
$http.get('/my/api', function(response){
console.log('ok');
console.log(response);
}, function(response){
console.log('not ok');
console.log(response)
});
console.log('after');
I just get 'before', 'after' and the message above.
Also in the network tab I get the expected response from server with status 500 and a json content in the body.
Except for the $httpProvider's errorResponse without a return $q.reject(), what could be the problem?