]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Fri, 2 May 2025 13:33:41 +0000 (09:33 -0400)
commitdf044527dae4632df926584e4cdd09cd46acaed4
treeb2e47a0884f7e692de557550e9b62a8fc87021b8
parentb3463a1cb1744fd17036c5efb60032ce70b4dad7
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>
(cherry picked from commit 36583eb9bdf0692790b0b6046a00e5b060da6c93)
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