Skip to content

Commit

Permalink
Merge pull request #1 from 0xNacho/0xNacho-patch-1
Browse files Browse the repository at this point in the history
Update auth.interceptor.client.service.js
  • Loading branch information
0xNacho committed Nov 9, 2015
2 parents 3165351 + 680e268 commit 913a288
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ angular.module('core').factory('authInterceptor', ['$q', '$injector',
responseError: function(rejection) {
if (!rejection.config.ignoreAuthModule) {
switch (rejection.status) {
case 400:
$injector.get('$state').transitionTo('bad-request');
break;
case 401:
$injector.get('$state').transitionTo('authentication.signin');
break;
case 403:
$injector.get('$state').transitionTo('forbidden');
break;
case 404:
$injector.get('$state').transitionTo('not-found');
break;
}
}
// otherwise, default behaviour
Expand Down

0 comments on commit 913a288

Please sign in to comment.