From 91db041ac29a59383f67423e44d00c0fcd2e749f Mon Sep 17 00:00:00 2001 From: luogw <3132758203@qq.com> Date: Tue, 31 Mar 2026 11:25:43 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PostToGenerateQuestionDomainServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java b/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java index a1b760b..c5291d1 100644 --- a/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java +++ b/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java @@ -97,6 +97,8 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu return; } + String message; + try { // 应用限流:获取令牌,超过限流速率则等待 long waitStart = System.currentTimeMillis(); @@ -115,6 +117,8 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu return; } + message = response != null ? response.getMessage() : "response is null"; + }catch (Exception e) { if (e instanceof WebClientResponseException exception) { int statusCode = exception.getStatusCode().value(); @@ -132,10 +136,11 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu return; } } + message = e.getMessage(); } - log.warn(">>> [题目生成] 调用算法服务失败, TaskId: {}", - taskId); + log.warn(">>> [题目生成] 调用算法服务失败, TaskId: {}, message: {}", + taskId,message); //消息提醒 notifyUtil.notify(taskId, clusterId);