diff --git a/src/main/java/dev/struchkov/example/controlleradvice/controller/ExceptionApiHandler.java b/src/main/java/dev/struchkov/example/controlleradvice/controller/ExceptionApiHandler.java index 5838ace..903b39d 100644 --- a/src/main/java/dev/struchkov/example/controlleradvice/controller/ExceptionApiHandler.java +++ b/src/main/java/dev/struchkov/example/controlleradvice/controller/ExceptionApiHandler.java @@ -12,14 +12,14 @@ import org.springframework.web.method.annotation.MethodArgumentTypeMismatchExcep public class ExceptionApiHandler { @ExceptionHandler(NotFoundException.class) - public ResponseEntity authException(NotFoundException exception) { + public ResponseEntity notFoundException(NotFoundException exception) { return ResponseEntity .status(HttpStatus.NOT_FOUND) .body(new ErrorMessage(exception.getMessage())); } @ExceptionHandler(MethodArgumentTypeMismatchException.class) - public ResponseEntity authException(MethodArgumentTypeMismatchException exception) { + public ResponseEntity mismatchException(MethodArgumentTypeMismatchException exception) { return ResponseEntity .status(HttpStatus.NOT_FOUND) .body(new ErrorMessage(exception.getMessage()));