From db9fe842599b9a46d0770c346b4f7c23021033cc Mon Sep 17 00:00:00 2001 From: csimonis Date: Thu, 15 May 2025 10:51:29 +0200 Subject: [PATCH] fix: change status code for EmailNotVerifiedException --- .../szut/casino/exceptionHandling/GlobalExceptionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/de/szut/casino/exceptionHandling/GlobalExceptionHandler.java b/backend/src/main/java/de/szut/casino/exceptionHandling/GlobalExceptionHandler.java index 65b3b4b..9c185a8 100644 --- a/backend/src/main/java/de/szut/casino/exceptionHandling/GlobalExceptionHandler.java +++ b/backend/src/main/java/de/szut/casino/exceptionHandling/GlobalExceptionHandler.java @@ -36,6 +36,6 @@ public class GlobalExceptionHandler { @ExceptionHandler(EmailNotVerifiedException.class) public ResponseEntity handleEmailNotVerifiedException(EmailNotVerifiedException ex, WebRequest request) { ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); - return new ResponseEntity<>(errorDetails, HttpStatus.BAD_REQUEST); + return new ResponseEntity<>(errorDetails, HttpStatus.UNAUTHORIZED); } }