From 1ecce5dafa61a688f7370b248eab51712255ee1b Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 4 Mar 2025 14:55:39 -0500 Subject: [PATCH] rgw/s3: map ENOSPC to 507 InsufficientCapacity Signed-off-by: Casey Bodley (cherry picked from commit 7a06e84146871db1f885a7b5993aa1e06c3693a0) Conflicts: src/rgw/rgw_common.cc missing account-related error mappings --- src/rgw/rgw_common.cc | 2 ++ src/rgw/rgw_rest.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 5a25e58b69515..63af6e070eca8 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -132,6 +132,8 @@ rgw_http_errors rgw_http_s3_errors({ { ERR_NO_SUCH_TAG_SET, {404, "NoSuchTagSet"}}, { ERR_NO_SUCH_BUCKET_ENCRYPTION_CONFIGURATION, {404, "ServerSideEncryptionConfigurationNotFoundError"}}, { ERR_NO_SUCH_PUBLIC_ACCESS_BLOCK_CONFIGURATION, {404, "NoSuchPublicAccessBlockConfiguration"}}, + { EDQUOT, {507, "InsufficientCapacity"}}, + { ENOSPC, {507, "InsufficientCapacity"}}, }); rgw_http_errors rgw_http_swift_errors({ diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 80708800257d8..a5659e68b66f7 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -82,6 +82,7 @@ const static struct rgw_http_status_code http_codes[] = { { 500, "Internal Server Error" }, { 501, "Not Implemented" }, { 503, "Slow Down"}, + { 507, "Insufficient Storage"}, { 0, NULL }, }; -- 2.39.5