From 5b44efc5664fa435e60ce050814f5acaf3555b4f Mon Sep 17 00:00:00 2001 From: geniy Date: Wed, 19 Feb 2025 15:17:46 +0300 Subject: [PATCH] dev/2025-02-19-15-17 --- .../com/example/nto/exception/GlobalExceptionHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/nto/exception/GlobalExceptionHandler.java b/src/main/java/com/example/nto/exception/GlobalExceptionHandler.java index 331aeff..8631ac4 100644 --- a/src/main/java/com/example/nto/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/example/nto/exception/GlobalExceptionHandler.java @@ -8,22 +8,22 @@ import org.springframework.web.bind.annotation.ExceptionHandler; @ControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(CodeNotFoundException.class) - ResponseEntity codeNotFoundExceptionHandler(NullPointerException e) { + ResponseEntity codeNotFoundExceptionHandler(CodeNotFoundException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } @ExceptionHandler(EmployeeNotFoundException.class) - ResponseEntity employeeNotFoundExceptionHandler(NullPointerException e) { + ResponseEntity employeeNotFoundExceptionHandler(EmployeeNotFoundException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.UNAUTHORIZED); } @ExceptionHandler(EmployeeDataNotFoundException.class) - ResponseEntity employeeDataNotFoundExceptionHandler(NullPointerException e) { + ResponseEntity employeeDataNotFoundExceptionHandler(EmployeeDataNotFoundException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); } @ExceptionHandler(EmployeeIsBlockedException.class) - ResponseEntity employeeIsBlockedExceptionHandler(NullPointerException e) { + ResponseEntity employeeIsBlockedExceptionHandler(EmployeeIsBlockedException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.LOCKED); } }