Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit ae56ecd

Browse files
fix: Suppress exception from mtls_init_task in requests.py
fix: Suppress exception from mtls_init_task in requests.py
1 parent 952a407 commit ae56ecd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

google/auth/aio/transport/sessions.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,10 @@ async def request(
266266
if self._mtls_init_task:
267267
try:
268268
await self._mtls_init_task
269-
except exceptions.MutualTLSChannelError:
270-
# Re-raise the already-wrapped mTLS error
271-
raise
272-
except Exception as caught_exc:
273-
# Wrap any other unexpected exceptions from the task
274-
raise exceptions.MutualTLSChannelError(caught_exc) from caught_exc
269+
except Exception:
270+
# Suppress all exceptions from the background mTLS initialization task,
271+
# allowing the request to fail naturally elsewhere.
272+
pass
275273
retries = _exponential_backoff.AsyncExponentialBackoff(
276274
total_attempts=total_attempts,
277275
)

0 commit comments

Comments
 (0)