You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There is currently no way to check whether an object exists in a bucket.
The README has a link to an exists function, but the method doesn't actually exist:
Describe the solution you'd like
Adding an exists method to the Bucket API.
Describe alternatives you've considered
I've tried using get_object or head_object and checking for the error variant, but I have no idea which S3Error variant is returned when the object doesn't exist vs when anything else goes wrong with fetching the object's data.
The text was updated successfully, but these errors were encountered:
It looks like the error value returned when an object doesn't exist is S3Error::Http(404, _).
It'd still be nice to get this as its own feature.
Note that without the ListBucket permission, you will always get a 403 instead, and you tell whether an object doesn't exist or you just can't access it - this is by design in S3's API.
It looks like the error value returned when an object doesn't exist is S3Error::Http(404, _). It'd still be nice to get this as its own feature. Note that without the ListBucket permission, you will always get a 403 instead, and you tell whether an object doesn't exist or you just can't access it - this is by design in S3's API.
I cannot even see a way to get the StatusCode because we lose it in the InvalidStatusCode error creation.
Is your feature request related to a problem? Please describe.
There is currently no way to check whether an object exists in a bucket.
The README has a link to an
exists
function, but the method doesn't actually exist:rust-s3/README.md
Line 77 in 5105a1b
Describe the solution you'd like
Adding an
exists
method to the Bucket API.Describe alternatives you've considered
I've tried using
get_object
orhead_object
and checking for the error variant, but I have no idea whichS3Error
variant is returned when the object doesn't exist vs when anything else goes wrong with fetching the object's data.The text was updated successfully, but these errors were encountered: