-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error handling is STILL completely unreliable and unusable #5333
Comments
Hi @Cyberax , |
This needs to be addressed for multiple services, not just s3. |
Given that AWS Go SDK V2 is GA now, is there a plan for fixing this while preserving backwards compat? This is a major shortcoming of V2 and I don't want my code to break when (if?) this is fixed, so I am inclined to stay on AWS Go SDK V1. |
You can work around this issue by having a helper function to check the error codes. I've given up on waiting for AWS to fix this. Here's my method:
Using:
|
Thank you @Cyberax ! You saved my day :) |
I am running into the same issue, but with DynamoDB APIs. It's a shame that this issue is not prioritized considering that this way of handling errors is suggested in migration guide. |
Hi @Cyberax and all. Just to give an update. This is not GO SDK, or any AWS SDK specific issue. This is an S3 modeling issue that causes errors to not be mapped correctly from S3 to the respective SDKs. This is still on the backlog, but requires the coordination of two major teams so takes time. I will raise this again with the service team in hopes that they can address it. These two issues are somewhat related and stem from the same reason: |
@yerke , Dynamo's API shouldn't have this behavior. Please cut a separate, detailed ticket, with clear reproduction steps and I will address it. |
@RanVaknin Here you go: aws/aws-sdk-go-v2#1773. Thanks for looking into it. |
Created an internal ticket with the S3 team to add NoSuchBucket to the list of modeled errors for Thanks, |
Comments on closed issues are hard for our team to see. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
Error handling for S3 is unreliable and useless.
Version of AWS SDK for Go?
Example: v1.8.1
Version of Go (
go version
)?1.16
To Reproduce (observed behavior)
Run
GetBucketLocation
on a non-existing bucket:Expected behavior
The error should have been properly interpreted.
Additional context
The generated deserializer is not even reached and doesn't have any provisions to deserialize
NoSuchBucket
errors: https://github.com/aws/aws-sdk-go-v2/blob/3ddb4d670277f173ec60e271ced9a07b605fbc0c/service/s3/deserializers.go#L3467The only mentions of
NoSuchBucket
handling is inListObjects
andListObjectsV2
error handling.The text was updated successfully, but these errors were encountered: