Class ConversionErrorHandler

java.lang.Object
io.micronaut.http.server.exceptions.ConversionErrorHandler
All Implemented Interfaces:
ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,io.micronaut.http.HttpResponse>

@Singleton @Produces public class ConversionErrorHandler extends Object implements ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,io.micronaut.http.HttpResponse>
Handles exception of type ConversionErrorException.
Since:
1.0
  • Constructor Details

    • ConversionErrorHandler

      @Inject public ConversionErrorHandler(ErrorResponseProcessor<?> responseProcessor)
      Constructor.
      Parameters:
      responseProcessor - Error Response Processor
  • Method Details

    • handle

      public io.micronaut.http.HttpResponse handle(io.micronaut.http.HttpRequest request, io.micronaut.core.convert.exceptions.ConversionErrorException exception)
      Description copied from interface: ExceptionHandler
      Handles an exception and returns the result.
      Specified by:
      handle in interface ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,io.micronaut.http.HttpResponse>
      Parameters:
      request - The request
      exception - The exception type
      Returns:
      The result