public class AwsProxyExceptionHandler extends java.lang.Object implements ExceptionHandler<AwsProxyResponse>
ExceptionHandler object that returns AwsProxyResponse objects.
Returns application/json messages with a status code of 500 when the RequestReader failed to read the incoming event.
For all other exceptions returns a 502. Responses are populated with a JSON object containing a message property.ExceptionHandler| Constructor and Description |
|---|
AwsProxyExceptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
AwsProxyResponse |
handle(java.lang.Throwable ex)
The handle method is called by the container object whenever an exception occurs in the
proxy method
for typed calls |
void |
handle(java.lang.Throwable ex,
java.io.OutputStream stream)
This handle implementation is called whenever an exception occurs in the stream-based
proxy method. |
public AwsProxyResponse handle(java.lang.Throwable ex)
ExceptionHandlerproxy method
for typed callshandle in interface ExceptionHandler<AwsProxyResponse>ex - The exception thrown by the applicationpublic void handle(java.lang.Throwable ex,
java.io.OutputStream stream)
throws java.io.IOException
ExceptionHandlerproxy method.handle in interface ExceptionHandler<AwsProxyResponse>ex - The exception thrown by the applicationstream - The OutputStream where the exception will be writtenjava.io.IOException - When the exception handler fails to write to the OutputStreamCopyright © 2018. All Rights Reserved.