diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java index 7ba14087e9..2200637d74 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java @@ -114,11 +114,17 @@ public class RestControllerExceptionHandler { } @ExceptionHandler({Exception.class}) - public ResponseEntity handlerException(Exception e) { - if (e instanceof EofException) { - return ResponseEntity.internalServerError() - .body(ResultHolder.error(MsHttpResultCode.FAILED.getCode(), - e.getMessage(), null)); + public ResponseEntity handleException(Exception e) { + return ResponseEntity.internalServerError() + .body(ResultHolder.error(MsHttpResultCode.FAILED.getCode(), + e.getMessage(), getStackTraceAsString(e))); + } + + @ExceptionHandler({EofException.class}) + public ResponseEntity handleEofException(HttpServletRequest request, Exception e) { + String requestURI = request.getRequestURI(); + if (StringUtils.startsWith(requestURI, "/assets")) { + return ResponseEntity.internalServerError().body(null); } return ResponseEntity.internalServerError() .body(ResultHolder.error(MsHttpResultCode.FAILED.getCode(),