readBeforeAttempt
A hook called before each attempt at sending the protocol request message to the service.
When: This will ALWAYS be called once per attempt, except when a failure occurs earlier in the request pipeline. This method may be invoked multiple times in the event of retries.
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 readBeforeAttempt
hook invoked. Other hooks will then be skipped and execution will jump to modifyBeforeAttemptCompletion with the raised error as the ResponseInterceptorContext.response result. If multiple interceptors raise an error in readBeforeAttempt
then the latest will be used and earlier ones will be logged and added as suppressed exceptions.