Cleaned up excessive logging at client, paring down to errors mostly and critical info
This commit is contained in:
@@ -32,7 +32,6 @@ function handleError(action, error, route) {
|
||||
//reaction to directly entered or opened link, not application logic driving it, so home is safest choice
|
||||
//
|
||||
if (error.message && error.message.includes("NotAuthorized")) {
|
||||
window.$gz.store.commit("logItem", "Not authorized, redirecting to HOME");
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
window.$gz.translation.get("ErrorUserNotAuthorized")
|
||||
@@ -44,10 +43,6 @@ function handleError(action, error, route) {
|
||||
|
||||
//Handle 401 not authenticated
|
||||
if (error.message && error.message.includes("NotAuthenticated")) {
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"User is not authenticated, redirecting to LOGIN"
|
||||
);
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-error",
|
||||
window.$gz.translation.get("ErrorUserNotAuthenticated")
|
||||
@@ -66,7 +61,6 @@ function handleError(action, error, route) {
|
||||
error.message.includes("NetworkError") ||
|
||||
error.message.includes("Network request failed")
|
||||
) {
|
||||
window.$gz.store.commit("logItem", "Network error");
|
||||
let msg = "";
|
||||
|
||||
if (window.$gz.store.state.authenticated) {
|
||||
@@ -288,11 +282,6 @@ export default {
|
||||
) {
|
||||
window.$gz.store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");
|
||||
window.$gz.store.commit("setHelpURL", "http://localhost:7575/docs/");
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"gzapi::APIUrl -> setting to dev. mode: " +
|
||||
window.$gz.store.state.apiUrl
|
||||
);
|
||||
} else {
|
||||
//production location <protocol>//<hostname>:<port>/
|
||||
window.$gz.store.commit(
|
||||
@@ -303,10 +292,6 @@ export default {
|
||||
"setAPIURL",
|
||||
window.location.protocol + "//" + window.location.host + "/api/v8.0/"
|
||||
);
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"gzapi::APIUrl -> setting to: " + window.$gz.store.state.apiUrl
|
||||
);
|
||||
}
|
||||
}
|
||||
return window.$gz.store.state.apiUrl + apiPath;
|
||||
|
||||
Reference in New Issue
Block a user