优化提示

This commit is contained in:
chenxudong 2025-01-09 10:09:29 +08:00
parent 54c42132a7
commit b15d2dec57
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
public class GlobalExceptionHandler {
@ExceptionHandler(RuntimeException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public ElectromagneticResult<?> runTimeError(Throwable e) {
log.error(e.getMessage(), e);
@ -23,7 +23,7 @@ public class GlobalExceptionHandler {
}
@ExceptionHandler(BizException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public ElectromagneticResult<?> bizError(BizException e) {
log.error(e.getMessage(), e);