Skip to content
This repository
Browse code

httpBuffer: fixed error handling

  • Loading branch information...
commit 4bef6b6830c424c08d998ba2daf8ff60bb73e301 1 parent 28d0b40
Witold Szczerba authored

Showing 1 changed file with 8 additions and 4 deletions. Show diff stats Hide diff stats

  1. +8 4 src/http-auth-interceptor.js
12 src/http-auth-interceptor.js
@@ -69,10 +69,14 @@
69 69 var $http;
70 70
71 71 function retryHttpRequest(config, deferred) {
72   - $http = $http || $injector.get('$http');
73   - $http(config).then(function(response) {
  72 + function successCallback(response) {
74 73 deferred.resolve(response);
75   - });
  74 + }
  75 + function errorCallback(response) {
  76 + deferred.reject(response);
  77 + }
  78 + $http = $http || $injector.get('$http');
  79 + $http(config).then(successCallback, errorCallback);
76 80 }
77 81
78 82 return {
@@ -97,4 +101,4 @@
97 101 }
98 102 };
99 103 }]);
100   -})();
  104 +})();

0 comments on commit 4bef6b6

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