From cbc0def97340f67ddf55b5ffde6522e7b47e3a80 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Fri, 17 Jun 2022 23:27:28 +0300 Subject: [PATCH] Fix --- .../controlleradvice/controller/ExceptionApiHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()));