修复自定义异常NPE问题

This commit is contained in:
zhangdeman committed 2025-06-16 20:27:08 +08:00
1 parent c669c268f7
commit 8cc165c9be
1 file changed
+1 -1
@@ -128,7 +128,7 @@ public class Response<Data> implements Serializable {
public Response<Data> failure(RuntimeContext runtimeContext, HttpStatus httpStatus, CustomException customException) {
setHandleSuccess(false);
setErrorDetail(customException.getCause().toString()); // 异常堆栈
setErrorDetail(customException.getData()); // 异常堆栈
// 错误码使用 category+_+code
return any(runtimeContext, httpStatus, customException.getCategory() + "_"+customException.getCode(), customException.getMessage(), null);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.