Class OtpControllerAdvice


  • @RestControllerAdvice
    public class OtpControllerAdvice
    extends Object
    Central class for handling exceptions.
    Since:
    1.0.0
    Author:
    Ritesh Sinha, Sagar Mahapatra
    • Constructor Detail

      • OtpControllerAdvice

        public OtpControllerAdvice()
    • Method Detail

      • otpGeneratorValidity

        @ExceptionHandler(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
        This method handles MethodArgumentNotValidException.
        Parameters:
        httpServletRequest - the request
        e - The exception
        Returns:
        The response entity.
        Throws:
        IOException - the IO Exception
      • onHttpMessageNotReadable

        @ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ServiceError>> onHttpMessageNotReadable​(org.springframework.http.converter.HttpMessageNotReadableException e)