Skip to content

Commit 270ca47

Browse files
committed
fix(redis): 捕捉NameServiceApi异常 #10021
1 parent 24292cf commit 270ca47

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

dbm-ui/backend/flow/plugins/components/collections/common/clb_manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def _execute(self, data, parent_data) -> bool:
8686
self.log_error(_("无法适配到传入的域名处理类型,请联系系统管理员:{}").format(dns_op_type))
8787
return False
8888

89+
self.log_info(result)
90+
if "code" in result and result["code"] != 0:
91+
self.log_error(_("调用clb执行失败"))
92+
return False
8993
self.log_info("successfully")
9094
return result
9195

dbm-ui/backend/flow/plugins/components/collections/common/polaris_manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def _execute(self, data, parent_data) -> bool:
7676
self.log_error(_("无法适配到传入的域名处理类型,请联系系统管理员:{}").format(dns_op_type))
7777
return False
7878

79+
self.log_info(result)
80+
if "code" in result and result["code"] != 0:
81+
self.log_error(_("调用polaris执行失败"))
82+
return False
7983
self.log_info("successfully")
8084
return result
8185

dbm-ui/backend/flow/plugins/components/collections/redis/dns_manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ def _execute(self, data, parent_data) -> bool:
9393
self.log_error(_("无法适配到传入的域名处理类型,请联系系统管理员:{}").format(dns_op_type))
9494
return False
9595

96+
self.log_info(result)
97+
if "code" in result and result["code"] != 0:
98+
self.log_error(_("调用dns执行失败"))
99+
return False
96100
self.log_info("successfully")
97101
return result
98102

0 commit comments

Comments
 (0)