优化异常堆栈

This commit is contained in:
白茶清欢 2025-06-16 18:14:29 +08:00
parent 42e26ebd67
commit da6a532edb

View File

@ -128,7 +128,7 @@ public class Response<Data> implements Serializable {
public Response<Data> failure(RuntimeContext runtimeContext, HttpStatus httpStatus, CustomException customException) {
setHandleSuccess(false);
setErrorDetail(customException.getStackTrace()); // 异常堆栈
setErrorDetail(customException.getCause().toString()); // 异常堆栈
// 错误码使用 category+_+code
return any(runtimeContext, httpStatus, customException.getCategory() + "_"+customException.getCode(), customException.getMessage(), null);
}