[CORD-1504] Handling XOSPermissionDenied errors
Change-Id: Icc1c796505207469d7416457802a3b9090031f72
diff --git a/src/interceptors.ts b/src/interceptors.ts
index a1b5df8..82c5f34 100644
--- a/src/interceptors.ts
+++ b/src/interceptors.ts
@@ -8,9 +8,11 @@
export function userStatusInterceptor($state: angular.ui.IStateService, $cookies: ng.cookies.ICookiesService, $q: ng.IQService) {
const checkLogin = (res) => {
+ // NOTE this interceptor may never be called as the request is not rejected byt the "model-discoverer" service
switch (res.status) {
case -1:
case 401:
+ case 403:
$cookies.remove('sessionid', {path: '/'});
$state.go('login');
return $q.reject(res);
@@ -20,7 +22,6 @@
};
return {
- // response: checkLogin,
responseError: checkLogin
};
}