From 6934309883df703771a58b17dafcdd1fb59b8f32 Mon Sep 17 00:00:00 2001 From: wangli <274027703@qq.com> Date: Wed, 21 Feb 2024 20:00:27 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E5=AE=8C=E5=96=84=E9=92=89?= =?UTF-8?q?=E9=92=89=E6=8A=A5=E9=94=99=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/axzo/workflow/server/common/util/DingTalkUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workflow-engine-server/src/main/java/cn/axzo/workflow/server/common/util/DingTalkUtils.java b/workflow-engine-server/src/main/java/cn/axzo/workflow/server/common/util/DingTalkUtils.java index 5ac55a5fc..e226865ed 100644 --- a/workflow-engine-server/src/main/java/cn/axzo/workflow/server/common/util/DingTalkUtils.java +++ b/workflow-engine-server/src/main/java/cn/axzo/workflow/server/common/util/DingTalkUtils.java @@ -7,6 +7,8 @@ import com.dingtalk.api.request.OapiRobotSendRequest; import com.dingtalk.api.response.OapiRobotSendResponse; import lombok.SneakyThrows; +import java.util.Objects; + /** * 钉钉告警处理 * @@ -28,7 +30,8 @@ public class DingTalkUtils { markdown.setTitle("Notice 流程实例创建失败, Env: " + profile); markdown.setText("#### [" + profile + "]流程实例创建失败\n" + "> 创建参数: " + JSON.toJSONString(req) + "\n\n" + - "> ###### 异常信息: " + JSON.toJSONString(throwable.getCause().getMessage()) + " \n"); + "> ###### 异常信息: " + JSON.toJSONString(Objects.isNull(throwable.getCause()) ? throwable.getMessage() : + throwable.getCause().getMessage()) + " \n"); request.setMarkdown(markdown); OapiRobotSendResponse response = client.execute(request); }