修改msg 信息统一处理

This commit is contained in:
韩鹏辉 2024-06-14 14:50:25 +08:00
parent 39c67616fe
commit f3de388e49
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ public class DefaultExceptionAdvice {
@ExceptionHandler(MsgException.class)
public ResponseEntity handleException(MsgException e) {
LOGGER.error("业务异常", e);
Result response = Result.failure(DefaultError.BUSINESS_ERROR);
Result response = Result.fail(e.getMessage());
response.setMsg(e.getMessage());
return new ResponseEntity<>(response, HttpStatus.OK);
}