From 7b9af32e28fbc823e1d9b348484039761907a52a Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 4 Apr 2024 10:38:02 -0400 Subject: [PATCH] rgw: don't map to EIO in rgw_http_error_to_errno() the http client uses EIO to detect connection errors specifically. if we map normal http errors to EIO, we incorrectly mark their endpoint as failed and route requests to other endpoints (if any exist) default to ERR_INTERNAL_ERROR (500 InternalError) instead Signed-off-by: Casey Bodley (cherry picked from commit 37352a90740960407a07977dd7236156b803dd63) --- src/rgw/rgw_http_errors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_http_errors.h b/src/rgw/rgw_http_errors.h index 5e052819e05..2f93cdf36d7 100644 --- a/src/rgw/rgw_http_errors.h +++ b/src/rgw/rgw_http_errors.h @@ -37,7 +37,7 @@ static inline int rgw_http_error_to_errno(int http_err) case 503: return -EBUSY; default: - return -EIO; + return -ERR_INTERNAL_ERROR; } return 0; /* unreachable */ -- 2.39.5