aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 12 forks source link

boto3.client("s3").head_bucket does not throw NoSuchBucket as per documentation #726

Closed tim-finnigan closed 1 month ago

tim-finnigan commented 2 months ago

Original issue here: https://github.com/boto/boto3/issues/4092

ref: P127336178

anentropic commented 2 months ago

Some related earlier issues:

tim-finnigan commented 1 month ago

Thanks for sharing those, here's another related issue: https://github.com/aws/aws-sdk/issues/255. We heard back from an S3 documentation writer who updated this page: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html

This is now highlighted in a Note for better visibility:

image

So while the error below is documented:

image

It cannot be handled client-side due to the limitations described in the Note. Please use the Provide feedback to send any additional feedback directly to the S3 team regarding this.

github-actions[bot] commented 1 month ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

anentropic commented 1 month ago

So... this will never get fixed?

The documentation change in API_HeadBucket does nothing to clarify the situation for Boto3 users who find a NoSuchBucket exception class on the S3 client instance that never gets raised. To all intents and purposes it still looks like the thing you should catch for the 404 case.

Is it all so auto-generated that it's impossible to put a specific note in the Boto3 docs?