@RestControllerAdvice public class OtpControllerAdvice extends Object
| Constructor and Description |
|---|
OtpControllerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
defaultErrorHandler(javax.servlet.http.HttpServletRequest httpServletRequest,
Exception e) |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
onHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException e) |
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
otpGeneratorValidity(javax.servlet.http.HttpServletRequest httpServletRequest,
org.springframework.web.bind.MethodArgumentNotValidException e)
This method handles MethodArgumentNotValidException.
|
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
otpValidationArgumentValidity(javax.servlet.http.HttpServletRequest httpServletRequest,
OtpInvalidArgumentException exception)
This method handles OtpInvalidArgumentException.
|
org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> |
otpValidationKeyNullValidity(javax.servlet.http.HttpServletRequest httpServletRequest,
RequiredKeyNotFoundException exception)
This method handles RequiredKeyNotFoundException.
|
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> otpGeneratorValidity(javax.servlet.http.HttpServletRequest httpServletRequest, org.springframework.web.bind.MethodArgumentNotValidException e) throws IOException
httpServletRequest - the requeste - The exceptionIOException - the IO Exception@ExceptionHandler(value=OtpInvalidArgumentException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> otpValidationArgumentValidity(javax.servlet.http.HttpServletRequest httpServletRequest, OtpInvalidArgumentException exception) throws IOException
httpServletRequest - the requestexception - The exception.IOException - the IO Exception@ExceptionHandler(value=RequiredKeyNotFoundException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> otpValidationKeyNullValidity(javax.servlet.http.HttpServletRequest httpServletRequest, RequiredKeyNotFoundException exception) throws IOException
httpServletRequest - the requestexception - The exception.IOException - the IO Exception@ExceptionHandler(value=org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> onHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException e)
@ExceptionHandler(value={java.lang.Exception.class,java.lang.RuntimeException.class})
public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> defaultErrorHandler(javax.servlet.http.HttpServletRequest httpServletRequest,
Exception e)
throws IOException
IOExceptionCopyright © 2020. All rights reserved.