Class JacksonExceptionHandler

java.lang.Object
io.micronaut.http.server.exceptions.JacksonExceptionHandler
All Implemented Interfaces:
ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,Object>

@Produces @Singleton @Requires(classes=com.fasterxml.jackson.core.JsonProcessingException.class) @Internal public final class JacksonExceptionHandler extends Object implements ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,Object>
Default exception handler for jackson processing errors.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • JacksonExceptionHandler

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

    • handle

      public Object handle(HttpRequest request, com.fasterxml.jackson.core.JsonProcessingException exception)
      Description copied from interface: ExceptionHandler
      Handles an exception and returns the result.
      Specified by:
      handle in interface ExceptionHandler<E extends Exception,Object>
      Parameters:
      request - The request
      exception - The exception type
      Returns:
      The result