Class JsonExceptionHandler
- java.lang.Object
-
- io.micronaut.http.server.exceptions.JsonExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,java.lang.Object>
@Produces @Singleton @Requires(classes=com.fasterxml.jackson.core.JsonProcessingException.class) public class JsonExceptionHandler extends java.lang.Object implements ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,java.lang.Object>
Default exception handler for JSON processing errors.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description JsonExceptionHandler(ErrorResponseProcessor<?> responseProcessor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objecthandle(io.micronaut.http.HttpRequest request, com.fasterxml.jackson.core.JsonProcessingException exception)Handles an exception and returns the result.
-
-
-
Constructor Detail
-
JsonExceptionHandler
@Inject public JsonExceptionHandler(ErrorResponseProcessor<?> responseProcessor)
Constructor.- Parameters:
responseProcessor- Error Response Processor
-
-
Method Detail
-
handle
public java.lang.Object handle(io.micronaut.http.HttpRequest request, com.fasterxml.jackson.core.JsonProcessingException exception)Description copied from interface:ExceptionHandlerHandles an exception and returns the result.- Specified by:
handlein interfaceExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,java.lang.Object>- Parameters:
request- The requestexception- The exception type- Returns:
- The result
-
-