diff --git a/tosfs/stability.py b/tosfs/stability.py index e06373b..9a01b68 100644 --- a/tosfs/stability.py +++ b/tosfs/stability.py @@ -122,4 +122,6 @@ def _is_retryable_tos_server_exception(e: TosError) -> bool: def _is_retryable_tos_client_exception(e: TosError) -> bool: - return isinstance(e, TosClientError) and e.cause in TOS_CLIENT_RETRYABLE_EXCEPTIONS + return isinstance(e, TosClientError) and any( + isinstance(e.cause, excp) for excp in TOS_CLIENT_RETRYABLE_EXCEPTIONS + )