-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
My spring data rest implementation throws exception in some cases. I would like to handle that exception in the error part of the promise call. The issue is that the error part is not called.
var myHttpPromise = $http.post('http://localhost:54000/api/v1/systems', vm.data);
SpringDataRestAdapter.process(myHttpPromise)
.then(function (processedResponse) {
}, function(response) {
console.log(response);
});
I looked at the code in angular-spring-data-rest-interceptor-provider.js
and I was wondering if you should reject the promise in case of erros.
return SpringDataRestAdapter.process(response.data).then(function (processedResponse) {
response.data = processedResponse;
return response;
, function(response) {
return $q.reject(response);
});
Metadata
Metadata
Assignees
Labels
No labels