Class NotAllowedExceptionHandler
java.lang.Object
io.micronaut.http.server.exceptions.ErrorResponseProcessorExceptionHandler<NotAllowedException>
io.micronaut.http.server.exceptions.NotAllowedExceptionHandler
- All Implemented Interfaces:
ExceptionHandler<NotAllowedException,
HttpResponse<?>>
@Singleton
@Produces
public class NotAllowedExceptionHandler
extends ErrorResponseProcessorExceptionHandler<NotAllowedException>
Handles exception of type
NotAllowedException
and returns an HTTP 405 (Method Not Allowed) response with the "Allow" HTTP Header populated to the allowed headers.- Since:
- 4.6.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.http.server.exceptions.ErrorResponseProcessorExceptionHandler
responseProcessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MutableHttpResponse<?>
createResponse
(NotAllowedException exception) Methods inherited from class io.micronaut.http.server.exceptions.ErrorResponseProcessorExceptionHandler
handle
-
Constructor Details
-
NotAllowedExceptionHandler
-
-
Method Details
-
createResponse
- Specified by:
createResponse
in classErrorResponseProcessorExceptionHandler<NotAllowedException>
-