]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/pubsub: return 404 NotFound instead of NoSuchKey
authorCasey Bodley <cbodley@redhat.com>
Tue, 12 Mar 2024 20:26:44 +0000 (16:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:17 +0000 (13:09 -0400)
commit2cdddad82ecfc80e03a0b6269eee5981ab5b76f0
tree97ff5618fe8d801ca2ae83b7a33a8e5ef20ad211
parenta72975821fe36b411982346254a33771f97abb26
rgw/pubsub: return 404 NotFound instead of NoSuchKey

repurpose the ERR_NOT_FOUND define which was otherwise unused to
customize the error response for sns apis, which return the NotFound
error code instead of NoSuchKey from s3:

    https://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html#API_GetTopicAttributes_Errors

this allows boto3 sns clients to catch the NotFoundException as expected

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_common.cc
src/rgw/rgw_rest_pubsub.cc