Class HttpStatusHandler
java.lang.Object
io.micronaut.http.server.exceptions.ErrorResponseProcessorExceptionHandler<HttpStatusException>
io.micronaut.http.server.exceptions.HttpStatusHandler
- All Implemented Interfaces:
ExceptionHandler<HttpStatusException,
HttpResponse<?>>
@Singleton
@Produces
public class HttpStatusHandler
extends ErrorResponseProcessorExceptionHandler<HttpStatusException>
Handles exception of type
HttpStatusException
.- Since:
- 1.0
- Author:
- Iván López
-
Field Summary
Fields inherited from class io.micronaut.http.server.exceptions.ErrorResponseProcessorExceptionHandler
responseProcessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MutableHttpResponse<?>
createResponse
(HttpStatusException exception) HttpResponse<?>
handle
(HttpRequest request, HttpStatusException exception) Handles an exception and returns the result.
-
Constructor Details
-
HttpStatusHandler
Constructor.- Parameters:
responseProcessor
- Error Response Processor
-
-
Method Details
-
createResponse
- Specified by:
createResponse
in classErrorResponseProcessorExceptionHandler<HttpStatusException>
-
handle
Description copied from interface:ExceptionHandler
Handles an exception and returns the result.- Specified by:
handle
in interfaceExceptionHandler<HttpStatusException,
HttpResponse<?>> - Overrides:
handle
in classErrorResponseProcessorExceptionHandler<HttpStatusException>
- Parameters:
request
- The requestexception
- The exception type- Returns:
- The result
-