refactor: change response entity type in exception handler
All checks were successful
Quality Check / Tests (pull_request) Successful in 1m0s
Quality Check / Checkstyle Main (pull_request) Successful in 46s
gitea-sonarqube-bot OK
Build PR / Build and analyze (pull_request) Successful in 1m54s

This commit is contained in:
Jan Gleytenhoover 2024-10-02 09:09:26 +02:00
parent c317b226fe
commit 61d72684c9
Signed by: jank
GPG Key ID: B267751B8AE29EFE

@ -21,7 +21,7 @@ import java.util.Date;
public class GlobalExceptionHandler {
@ExceptionHandler(ResourceNotFoundException.class)
public ResponseEntity<?> handleHelloEntityNotFoundException(ResourceNotFoundException ex, WebRequest request) {
public ResponseEntity<ErrorDetails> handleHelloEntityNotFoundException(ResourceNotFoundException ex, WebRequest request) {
ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false));
return new ResponseEntity<>(errorDetails, HttpStatus.NOT_FOUND);
}