Skip to content
Browse files

httpBuffer: fixed error handling

  • Loading branch information...
1 parent 28d0b40 commit 4bef6b6830c424c08d998ba2daf8ff60bb73e301 @witoldsz committed Apr 5, 2013
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/http-auth-interceptor.js
View
12 src/http-auth-interceptor.js
@@ -69,10 +69,14 @@
var $http;
function retryHttpRequest(config, deferred) {
- $http = $http || $injector.get('$http');
- $http(config).then(function(response) {
+ function successCallback(response) {
deferred.resolve(response);
- });
+ }
+ function errorCallback(response) {
+ deferred.reject(response);
+ }
+ $http = $http || $injector.get('$http');
+ $http(config).then(successCallback, errorCallback);
}
return {
@@ -97,4 +101,4 @@
}
};
}]);
-})();
+})();

0 comments on commit 4bef6b6

Please sign in to comment.
Something went wrong with that request. Please try again.