Skip to content

api/RPCClient: Do not raise 404 remote exception if it must be reraised

The RPCClient class has a reraise_exceptions list containing exception types that should be reraised client side instead of wrapping them in a RemoteException instance.

If the remote exception comes with a 404 HTTP status code, it was automatically raised as a RemoteException regardless if the exception type must be reraised client side.

So ensure to not raise a RemoteException if the 404 remote exception should be reraised.

That change is required to fix HTTP status code for missing objects when querying the swh-objstorage RPC endpoints (aka 404, see D8228).


Migrated from D8227 (view on Phabricator)

Merge request reports