-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3: NotFound
error of HeadObject
isn't handled properly
#2880
Comments
The |
Thanks. That inconsistency should be fixed. Until then, detailed documentation about this behavior will help us. |
I am porting a service over from V1 to V2 and noticed that other function calls return This would be a breaking change, but I would consider not leaking types that come from a dependent package. This prevents callers from having to explicitly import the |
Smithy error type is not helpful if we need to distinguish between failure types (403 vs 404) and such. The only option right now is to cast to This behavior may result in very non obvious bugs in cases where |
|
Contacted service team for followup, waiting for response. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When the specified key doesn't exist,
HeadObject
returns Not Found. However, the error can't be handled properly using the code above.Version of AWS SDK for Go?
1.2.0
Version of Go (
go version
)?go version go1.15.3 linux/amd64
To Reproduce (observed behavior)
The code described above should be enough.
Expected behavior
errors.As(err, ¬FoundError)
returnstrue
when the specified key doesn't exist.The text was updated successfully, but these errors were encountered: