]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't map to EIO in rgw_http_error_to_errno() 56704/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 4 Apr 2024 14:38:02 +0000 (10:38 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 4 Apr 2024 14:38:06 +0000 (10:38 -0400)
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>
src/rgw/rgw_http_errors.h

index 5e052819e052e82f902c8922c7e5e313ce180027..2f93cdf36d71671e6de00516d97762b80977d15d 100644 (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 */