Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

no tagset results in an error for get_bucket_tagging, not a nil tagset #21

Closed
drewrothstein opened this issue Nov 29, 2013 · 2 comments
Closed

Comments

@drewrothstein
Copy link
Contributor

I expected when making this call without a tag on a bucket-
@s3.get_bucket_tagging(:bucket => 'my_bucket')

That it would return a nil tagset, not that it would throw this error-
Aws::S3::Errors::NoSuchTagSet: The TagSet does not exist

Happy to rescue errors but I would much rather have it return a nil tagset in this case.

@trevorrowe
Copy link
Contributor

The SDK raises an error extending from Aws::Errrors::ServiceError for all 400 and 500 level responses. In this particular scenario, the service returns a 404 response. This is the same response status code returned when you attempt to access a non-existent bucket. Rather than try to special case these by parsing the error message, the SDK only returns the structured response data for "successful", 200 level responses.

We are currently exploring how to add a higher level abstraction over these client methods. It would be feasible to address this there.

@trevorrowe
Copy link
Contributor

I'm going to close this issue for now as we will not be making changes to this particular operation. I have started work on the higher level abstractions for the services. I'll be blogging (http://ruby.awsblog.com/) about these soon, and I'll publish my work-in-progress ideas to a branch as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants