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
Constructors -
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:
createResponsein classErrorResponseProcessorExceptionHandler<HttpStatusException>
-
handle
Description copied from interface:ExceptionHandlerHandles an exception and returns the result.- Specified by:
handlein interfaceExceptionHandler<HttpStatusException,HttpResponse<?>> - Overrides:
handlein classErrorResponseProcessorExceptionHandler<HttpStatusException>- Parameters:
request- The requestexception- The exception type- Returns:
- The result
-