Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Display error also when it’s 401

天舟5fdd3d518ff4
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 06afdc52ad..eebf02e1e7 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -131,14 +131,14 @@ axios.interceptors.response.use(
store.dispatch("auth/logout").then(() => {
router.push({ name: "auth.signin" });
});
+ }
+ if (error.response.data.message) {
+ store.dispatch("notification/pushNotification", {
+ module: "bytebase",
+ style: "CRITICAL",
+ title: error.response.data.message,
+ });
} else {
- if (error.response.data.message) {
- store.dispatch("notification/pushNotification", {
- module: "bytebase",
- style: "CRITICAL",
- title: error.response.data.message,
- });
- }
throw error;
}
}