]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/rest: RGWRESTConn::forward() prefers to return http errors
authorCasey Bodley <cbodley@redhat.com>
Sat, 26 Apr 2025 01:02:29 +0000 (21:02 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 29 Apr 2025 15:17:29 +0000 (11:17 -0400)
commit36583eb9bdf0692790b0b6046a00e5b060da6c93
tree170ae7dd98732bb821656d1937df0655630eb398
parent46d6f817e81e38fb30a5ebe71e9d6c11caeabd39
rgw/rest: RGWRESTConn::forward() prefers to return http errors

callers need to distinguish between transport errors (a failure to
forward the request) and http errors (successfully forwarded and got a
response). forward() was losing this information by mapping any http
errors to errnos

use tl::expected to differentiate between transport errors and http
errors, with the latter being the successful/expected case

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/radosgw-admin/radosgw-admin.cc
src/rgw/rgw_op.cc
src/rgw/rgw_period_puller.cc
src/rgw/rgw_rest_client.cc
src/rgw/rgw_rest_client.h
src/rgw/rgw_rest_conn.cc
src/rgw/rgw_rest_conn.h
src/rgw/rgw_rest_iam.cc