This commit is contained in:
@@ -57,7 +57,7 @@ function handleError(action, error, route) {
|
||||
);
|
||||
router.push(window.$gz.store.state.homePage);
|
||||
|
||||
throw new Error("[ErrorUserNotAuthorized]");
|
||||
throw new Error("LT:ErrorUserNotAuthorized");
|
||||
}
|
||||
|
||||
//Handle 401 not authenticated
|
||||
@@ -73,7 +73,7 @@ function handleError(action, error, route) {
|
||||
|
||||
router.push("/login");
|
||||
|
||||
throw new Error("[ErrorUserNotAuthenticated]");
|
||||
throw new Error("LT:ErrorUserNotAuthenticated");
|
||||
}
|
||||
|
||||
//is it a network error?
|
||||
@@ -111,11 +111,11 @@ export default {
|
||||
status(response) {
|
||||
//Handle expected api errors
|
||||
if (response.status == 401) {
|
||||
throw new Error("[ErrorUserNotAuthenticated]");
|
||||
throw new Error("LT:ErrorUserNotAuthenticated");
|
||||
}
|
||||
|
||||
if (response.status == 403) {
|
||||
throw new Error("[ErrorUserNotAuthorized]");
|
||||
throw new Error("LT:ErrorUserNotAuthorized");
|
||||
}
|
||||
|
||||
//404 not found is an expected status not worth logging allow to bubble up
|
||||
@@ -150,11 +150,11 @@ export default {
|
||||
statusEx(response) {
|
||||
//Handle expected api errors
|
||||
if (response.status == 401) {
|
||||
throw new Error("[ErrorUserNotAuthenticated]");
|
||||
throw new Error("LT:ErrorUserNotAuthenticated");
|
||||
}
|
||||
|
||||
if (response.status == 403) {
|
||||
throw new Error("[ErrorUserNotAuthorized]");
|
||||
throw new Error("LT:ErrorUserNotAuthorized");
|
||||
}
|
||||
|
||||
//404 not found is an expected status not worth logging allow to bubble up
|
||||
|
||||
Reference in New Issue
Block a user