diff --git a/ayanova/src/api/apiutil.js b/ayanova/src/api/apiutil.js index 75b0224a..6901f2d1 100644 --- a/ayanova/src/api/apiutil.js +++ b/ayanova/src/api/apiutil.js @@ -190,8 +190,10 @@ export default { store.commit("logItem", errorMessage); alert("Error: " + errorMessage); reject(error); - auth.logout(); - router.push("/login"); + if (error.message && error.message.includes("401")) { + auth.logout(); + router.push("/login"); + } }); }); }