Package io.micronaut.problem
Class ThrowableProblemHandler
java.lang.Object
io.micronaut.problem.ThrowableProblemHandler
- All Implemented Interfaces:
io.micronaut.http.server.exceptions.ExceptionHandler<org.zalando.problem.ThrowableProblem,
io.micronaut.http.HttpResponse<?>>
@Produces
@Singleton
public class ThrowableProblemHandler
extends Object
implements io.micronaut.http.server.exceptions.ExceptionHandler<org.zalando.problem.ThrowableProblem,io.micronaut.http.HttpResponse<?>>
Handles exception of type
ThrowableProblem
.- Since:
- 1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionThrowableProblemHandler
(io.micronaut.http.server.exceptions.response.ErrorResponseProcessor<?> responseProcessor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.HttpResponse<?>
handle
(io.micronaut.http.HttpRequest request, org.zalando.problem.ThrowableProblem exception)
-
Constructor Details
-
ThrowableProblemHandler
public ThrowableProblemHandler(io.micronaut.http.server.exceptions.response.ErrorResponseProcessor<?> responseProcessor) Constructor.- Parameters:
responseProcessor
- Error Response Processor
-
-
Method Details
-
handle
public io.micronaut.http.HttpResponse<?> handle(io.micronaut.http.HttpRequest request, org.zalando.problem.ThrowableProblem exception) - Specified by:
handle
in interfaceio.micronaut.http.server.exceptions.ExceptionHandler<org.zalando.problem.ThrowableProblem,
io.micronaut.http.HttpResponse<?>>
-