From 37352a90740960407a07977dd7236156b803dd63 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 --- 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 5e052819e052..2f93cdf36d71 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.47.3