Class JsonExceptionHandler

java.lang.Object
io.micronaut.http.server.exceptions.JsonExceptionHandler
All Implemented Interfaces:
ExceptionHandler<io.micronaut.json.JsonSyntaxException,Object>

@Produces @Singleton @Internal public final class JsonExceptionHandler extends Object implements ExceptionHandler<io.micronaut.json.JsonSyntaxException,Object>
Default exception handler for JSON processing errors.
Since:
1.0
  • Constructor Details

    • JsonExceptionHandler

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

    • handle

      public Object handle(io.micronaut.http.HttpRequest request, io.micronaut.json.JsonSyntaxException 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