From 42e26ebd67afd4d3abbc4fded2209826a93409d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 16 Jun 2025 16:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9F=E4=B8=80=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/zhangdeman/context/Response.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/zhangdeman/context/Response.java b/src/main/java/cn/zhangdeman/context/Response.java index e526e83..1460cdd 100644 --- a/src/main/java/cn/zhangdeman/context/Response.java +++ b/src/main/java/cn/zhangdeman/context/Response.java @@ -129,7 +129,8 @@ public class Response implements Serializable { public Response failure(RuntimeContext runtimeContext, HttpStatus httpStatus, CustomException customException) { setHandleSuccess(false); setErrorDetail(customException.getStackTrace()); // 异常堆栈 - return any(runtimeContext, httpStatus, customException.getCode(), customException.getMessage(), null); + // 错误码使用 category+_+code + return any(runtimeContext, httpStatus, customException.getCategory() + "_"+customException.getCode(), customException.getMessage(), null); } // 任意姿势的响应