supress 403 error messages on get and patch requests

This commit is contained in:
sadnub
2021-11-04 21:00:52 -04:00
parent e9e1b4456f
commit cea919f304
3 changed files with 11 additions and 4 deletions

View File

@@ -47,6 +47,8 @@ export default function ({ app, router, store }) {
}
// perms
else if (error.response.status === 403) {
// don't notify user if method is GET
if (error.config.method === "get" || error.config.method === "patch") return Promise.reject({ ...error });
text = error.response.data.detail;
}
// catch all for other 400 error messages

View File

@@ -13,7 +13,6 @@ export default function () {
treeReady: false,
selectedRow: null,
agentTableLoading: false,
treeLoading: false,
needrefresh: false,
tableHeight: "300px",
tabHeight: "300px",
@@ -194,7 +193,9 @@ export default function () {
}
})
.catch(e => { });
.catch(e => {
state.treeReady = true
});
},
checkVer(context) {
axios.get("/core/version/").then(r => {

View File

@@ -669,7 +669,9 @@ export default {
this.frame = r.data;
this.$store.commit("AGENT_TABLE_LOADING", false);
})
.catch(e => {});
.catch(e => {
this.$store.commit("AGENT_TABLE_LOADING", false);
});
}
}
},
@@ -694,7 +696,9 @@ export default {
this.frame = r.data;
this.$store.commit("AGENT_TABLE_LOADING", false);
})
.catch(e => {});
.catch(e => {
this.$store.commit("AGENT_TABLE_LOADING", false);
});
},
showPolicyAdd(node) {
this.$q