You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by de...@apache.org on 2024/03/21 14:26:14 UTC

(shenyu-dashboard) branch master updated: Give exception prompt to improve operation experience (#427)

This is an automated email from the ASF dual-hosted git repository.

dengliming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new b3d6fd29 Give exception prompt to improve operation experience (#427)
b3d6fd29 is described below

commit b3d6fd299e7f10391ca448d4b253384c4f354ebe
Author: Kerwin Bryant <ke...@qq.com>
AuthorDate: Thu Mar 21 22:26:09 2024 +0800

    Give exception prompt to improve operation experience (#427)
---
 src/models/resource.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/models/resource.js b/src/models/resource.js
index b82c1841..429e1c31 100644
--- a/src/models/resource.js
+++ b/src/models/resource.js
@@ -101,8 +101,12 @@ export default {
     *fetchButtons(params, { call }) {
       const { payload, callback } = params;
       const json = yield call(getButtons, payload);
-      const resource = json.data;
-      callback(resource);
+      if (json.code === 200) {
+        const resource = json.data;
+        callback(resource);
+      } else {
+        message.warn(json.message);
+      }
     },
     *fetchMenuTree(_, { call, put }) {
       const json = yield call(getMenuTree);