readAfterAttempt
A hook called when an attempt is completed.
When: This will ALWAYS be called once per attempt, as long as readBeforeAttempt was executed.
Available Information: RequestInterceptorContext.request, ProtocolRequestInterceptorContext.protocolRequest, and ResponseInterceptorContext.response are ALWAYS available. ProtocolResponseInterceptorContext.protocolResponse is available if a response was received by the service for this attempt.
Modifications: In the event of retries, the context will not include changes made in previous attempts (e.g. by request signers or other interceptors).
Error Behavior: Errors raised by this hook will be stored until all interceptors have had their readAfterAttempt
hook invoked. If multiple interceptors raise an error in readAfterAttempt
then the latest will be used and earlier ones will be logged and added as suppressed exceptions. If the result of the attempt is determined to be retryable then execution will jump to readBeforeAttempt. Otherwise, execution will jump to modifyBeforeCompletion with the raised error as the ResponseInterceptorContext.response result.