Class HelpfulUnknownHostExceptionInterceptor
java.lang.Object
software.amazon.awssdk.awscore.interceptor.HelpfulUnknownHostExceptionInterceptor
- All Implemented Interfaces:
ExecutionInterceptor
public final class HelpfulUnknownHostExceptionInterceptor
extends Object
implements ExecutionInterceptor
This interceptor will monitor for
UnknownHostException
s and provide the customer with additional information they can
use to debug or fix the problem.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmodifyException
(Context.FailedExecution context, ExecutionAttributes executionAttributes) Modify the exception before it is thrown.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.core.interceptor.ExecutionInterceptor
afterExecution, afterMarshalling, afterTransmission, afterUnmarshalling, beforeExecution, beforeMarshalling, beforeTransmission, beforeUnmarshalling, modifyAsyncHttpContent, modifyAsyncHttpResponseContent, modifyHttpContent, modifyHttpRequest, modifyHttpResponse, modifyHttpResponseContent, modifyRequest, modifyResponse, onExecutionFailure
-
Constructor Details
-
HelpfulUnknownHostExceptionInterceptor
public HelpfulUnknownHostExceptionInterceptor()
-
-
Method Details
-
modifyException
public Throwable modifyException(Context.FailedExecution context, ExecutionAttributes executionAttributes) Description copied from interface:ExecutionInterceptor
Modify the exception before it is thrown.This will only be invoked if the entire execution fails. If a retriable error happens (according to the
RetryPolicy
) and a subsequent retry succeeds, this method will not be invoked.- Specified by:
modifyException
in interfaceExecutionInterceptor
- Parameters:
context
- The context associated with the execution that failed. An SDK request will always be available, but depending on the time at which the failure happened, the HTTP request, HTTP response and SDK response may not be available. This also includes the exception that triggered the failure.executionAttributes
- A mutable set of attributes scoped to one specific request/response cycle that can be used to give data to future lifecycle methods.- Returns:
- the modified Exception
-