Skip to content

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

Display the notification on request error if the response contains message

天舟1758133b634f
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 326efc6bb4..6c601a3cac 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -112,13 +112,15 @@ axios.interceptors.response.use(
},
(error) => {
if (error.response) {
- store.dispatch("notification/pushNotification", {
- module: "bytebase",
- style: "CRITICAL",
- title: error.response.data.errors,
- });
- throw error;
+ if (error.response.data.message) {
+ store.dispatch("notification/pushNotification", {
+ module: "bytebase",
+ style: "CRITICAL",
+ title: error.response.data.message,
+ });
+ }
}
+ throw error;
}
);