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); } }