File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ public class ProblemDetailsExceptionHandler {
672672 logger.error("Internal server error with ID: {}",
673673 problemDetail.getProperties().get("errorId"), ex);
674674
675- return ResponseEntity.of(problemDetail).build( );
675+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(problemDetail );
676676 }
677677
678678 @ExceptionHandler(EntityNotFoundException.class)
@@ -688,7 +688,7 @@ public class ProblemDetailsExceptionHandler {
688688 problemDetail.setInstance(URI.create(request.getRequestURI()));
689689 problemDetail.setProperty("timestamp", Instant.now());
690690
691- return ResponseEntity.of(problemDetail).build( );
691+ return ResponseEntity.status(HttpStatus.NOT_FOUND).body(problemDetail );
692692 }
693693
694694 @ExceptionHandler(ValidationException.class)
@@ -705,7 +705,7 @@ public class ProblemDetailsExceptionHandler {
705705 problemDetail.setProperty("timestamp", Instant.now());
706706 problemDetail.setProperty("violations", ex.getViolations());
707707
708- return ResponseEntity.of(problemDetail).build( );
708+ return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(problemDetail );
709709 }
710710}
711711
You can’t perform that action at this time.
0 commit comments