Removing unused ExceptionHandler

This commit is contained in:
Niket Agrawal 2023-09-17 23:10:10 +05:30
parent 58a74a6c80
commit c07c35882f

View File

@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
@RestControllerAdvice @RestControllerAdvice
public class GlobalExceptionHandler { public class GlobalExceptionHandler {
@ -29,9 +27,4 @@ public class GlobalExceptionHandler {
return ex.getMessage(); return ex.getMessage();
} }
@ExceptionHandler(InvalidFormatException.class)
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public String handleInvalidFormatException(InvalidFormatException ex) {
return ex.getOriginalMessage();
}
} }