Closed
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...
)
Describe the bug
It seems that the ObjectExistsStateRetryable
used by default in NewObjectExistsWaiter
is being retried for errors other than NotFound.
aws-sdk-go-v2/service/s3/api_op_HeadObject.go
Lines 915 to 930 in 3cc2195
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
For NotFound errors: retry HeadObject
For errors other than NotFound: return err as is
Current Behavior
Always retry when an error occurs, regardless of the error type.
Reproduction Steps
options.Retryable = func(_ context.Context, _ *s3.HeadObjectInput, _ *s3.HeadObjectOutput, err error) (bool, error) {
if err == nil {
return false, nil
}
var errorType *types.NotFound
if errors.As(err, &errorType) {
return true, nil
}
return false, err
}
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/service/s3 v1.71.1
Compiler and Version used
go version go1.23.4 darwin/arm64
Operating System and version
macOS Sonoma 14.1