Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit d2cd012

Browse files
Reject response on error
The correct way to close a response error handler is to reject the response, not simply return it, or anything using the plugin won't be able to use the error handler clause with their promises.
1 parent 4071ffc commit d2cd012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dist/angularJsOAuth2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
else if (response.status === 500) {
176176
$rootScope.$broadcast('oauth2:internalservererror');
177177
}
178-
return response;
178+
return $q.reject(response);
179179
}
180180
};
181181
return service;
@@ -343,4 +343,4 @@
343343
$httpProvider.interceptors.push('OAuth2Interceptor');
344344
}
345345
]);
346-
})();
346+
})();

0 commit comments

Comments
 (0)