This commit is contained in:
2019-05-02 19:46:34 +00:00
parent 60d1fb82fe
commit 640c6ef095
20 changed files with 400 additions and 271 deletions

View File

@@ -33,7 +33,7 @@ function devShowUnknownError(error) {
console.log(error);
gzevent.$emit(
"popup-message",
"notify-warning",
"DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console "
);
}
@@ -55,7 +55,7 @@ function handleError(action, error, route, reject) {
//
if (error.message && error.message.includes("NotAuthorized")) {
store.commit("logItem", "Not authorized, redirecting to HOME");
gzevent.$emit("popup-message", gzlocale.get("ErrorUserNotAuthorized"));
gzevent.$emit("notify-warning", gzlocale.get("ErrorUserNotAuthorized"));
router.push("/");
return reject("[ErrorUserNotAuthorized]");
}
@@ -63,6 +63,7 @@ function handleError(action, error, route, reject) {
//Handle 401 not authenticated
if (error.message && error.message.includes("NotAuthenticated")) {
store.commit("logItem", "User is not authenticated, redirecting to LOGIN");
gzevent.$emit("notify-error", gzlocale.get("ErrorUserNotAuthenticated"));
auth.logout();
router.push("/login");
return reject("[ErrorUserNotAuthenticated]");