From 7a06e84146871db1f885a7b5993aa1e06c3693a0 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 --- 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 5ecb2a1e17d..6ec60ff464a 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -140,6 +140,8 @@ rgw_http_errors rgw_http_s3_errors({ { ERR_NO_SUCH_PUBLIC_ACCESS_BLOCK_CONFIGURATION, {404, "NoSuchPublicAccessBlockConfiguration"}}, { ERR_ACCOUNT_EXISTS, {409, "AccountAlreadyExists"}}, { ECANCELED, {409, "ConcurrentModification"}}, + { 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 be6047b5dd5..0592d66e3c1 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -83,6 +83,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