From 6a3110b281813ca70ce4108d5e35f24f99e09521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cliuliaozhong=E2=80=9D?= Date: Thu, 12 Jan 2023 20:10:01 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BE=9D=E8=B5=96=E7=9A=84=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=B3=BB=E7=BB=9F=EF=BC=88CMDB=E3=80=81IAM=E7=AD=89?= =?UTF-8?q?=EF=BC=89=E6=8E=A5=E5=8F=A3=E5=BC=82=E5=B8=B8=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BF=A1=E6=81=AF=E4=BC=98=E5=8C=96=20#1430?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bk/job/common/cc/sdk/BizCmdbClient.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/commons/cmdb-sdk/src/main/java/com/tencent/bk/job/common/cc/sdk/BizCmdbClient.java b/src/backend/commons/cmdb-sdk/src/main/java/com/tencent/bk/job/common/cc/sdk/BizCmdbClient.java index 5397b45e73..8db35ddb4d 100644 --- a/src/backend/commons/cmdb-sdk/src/main/java/com/tencent/bk/job/common/cc/sdk/BizCmdbClient.java +++ b/src/backend/commons/cmdb-sdk/src/main/java/com/tencent/bk/job/common/cc/sdk/BizCmdbClient.java @@ -268,7 +268,12 @@ public InstanceTopologyDTO getCachedBizInstCompleteTopology(long bizId){ try { return bizInstCompleteTopologyCache.get(bizId); } catch (ExecutionException | UncheckedExecutionException e) { - throw new CmdbClientException(e, ErrorCode.CMDB_API_DATA_ERROR, null); + Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) e; + } else { + throw new CmdbClientException(e, ErrorCode.CMDB_API_DATA_ERROR, null); + } } }