Bug #59432
opens3 error response should use Resource instead of BucketName
0%
Description
the xml Error response is documented in https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
the relevant xml encoding happens here: https://github.com/ceph/ceph/blob/9bea055/src/rgw/rgw_common.cc#L365-L380
Updated by David Orman about 1 year ago
Casey Bodley wrote:
the xml Error response is documented in https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
the relevant xml encoding happens here: https://github.com/ceph/ceph/blob/9bea055/src/rgw/rgw_common.cc#L365-L380
Examples from Amazon S3:
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>test</Key><RequestId>XXXXXXXXX</RequestId><HostId>XXXXXXXXXXXX</HostId></Error>'
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>ldkjfkldjflk</BucketName><RequestId>XXXXXXXXXXXXXXXXXXXXXX</RequestId><HostId>XXXXXXXXXXXXXXX</HostId></Error>'
Updated by Cory Snyder about 1 year ago
This seems slightly more involved than simply renaming the tag because the Resource response element's value can be either a bucket name or an object name, depending on the context of the error. Sorting out whether an object or bucket name should be used for each error condition may take a bit of effort.