public interface ExceptionHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(HandlerInput input,
Throwable throwable)
Returns true if this handler is capable of handling the current exception and/or state.
|
Optional<com.amazon.ask.model.Response> |
handle(HandlerInput input,
Throwable throwable)
Handles the exception.
|
boolean canHandle(HandlerInput input, Throwable throwable)
input - handler input containing the RequestEnvelope, AttributesManager,
ServiceClientFactory, ResponseBuilder,
and other utilities.throwable - exceptionOptional<com.amazon.ask.model.Response> handle(HandlerInput input, Throwable throwable)
Response can optionally be returned to give the user a graceful error response.
If no response is provided, the SDK will throw the original exception back to the container, resulting in an
unhandled exception response to the end user.input - handler input containing the RequestEnvelope, AttributesManager,
ServiceClientFactory, ResponseBuilder,
and other utilities.throwable - the exception that was originally thrownOptional that may contain an error Response to be sent back by the skillCopyright © Amazon.com, Inc. or its affiliates. All Rights Reserved.