Class SecurityExceptionHandler
java.lang.Object
io.micronaut.aws.alexa.httpserver.exceptions.SecurityExceptionHandler
- All Implemented Interfaces:
io.micronaut.http.server.exceptions.ExceptionHandler<SecurityException,
io.micronaut.http.HttpResponse>
@Produces
@Singleton
@Requires(classes=java.lang.SecurityException.class)
public class SecurityExceptionHandler
extends Object
implements io.micronaut.http.server.exceptions.ExceptionHandler<SecurityException,io.micronaut.http.HttpResponse>
ExceptionHandler
to handle SecurityException
. It returns a 400 response with the exception message wrapped in a JsonError
.- Since:
- 2.0.0
- Author:
- sdelamo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.HttpResponse
handle
(io.micronaut.http.HttpRequest request, SecurityException ex)
-
Constructor Details
-
SecurityExceptionHandler
public SecurityExceptionHandler()
-
-
Method Details
-
handle
public io.micronaut.http.HttpResponse handle(io.micronaut.http.HttpRequest request, SecurityException ex) - Specified by:
handle
in interfaceio.micronaut.http.server.exceptions.ExceptionHandler<SecurityException,
io.micronaut.http.HttpResponse>
-