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); } // 任意姿势的响应