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 <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2024-04-04 10:38:02 -04:00
parent becfb26b80
commit 37352a9074

View File

@ -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 */