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