记得上下班打卡 | git大法好,push需谨慎

Commit fca7e6af authored by 张国柄's avatar 张国柄

fix:global exception;

parent 0d351c23
...@@ -75,7 +75,8 @@ public class RestControllerAdviceHandler { ...@@ -75,7 +75,8 @@ public class RestControllerAdviceHandler {
return new ResponseEntity<Error>(new Error(errorCode, message), HttpStatus.OK); return new ResponseEntity<Error>(new Error(errorCode, message), HttpStatus.OK);
} else { } else {
logger.error("Unprocessed exception", rex); logger.error("Unprocessed exception", rex);
return new ResponseEntity<Error>(new Error(ErrorCode.HTTP_SYSTEM_ERROR.getCode(), ErrorCode.HTTP_SYSTEM_ERROR.getMessage()), HttpStatus.OK); // return new ResponseEntity<Error>(new Error(ErrorCode.HTTP_SYSTEM_ERROR.getCode(), ErrorCode.HTTP_SYSTEM_ERROR.getMessage()), HttpStatus.OK);
return new ResponseEntity<Error>(HttpStatus.INTERNAL_SERVER_ERROR);
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment