mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 22:14:18 +02:00
Pass httpxerrors through
This commit is contained in:
parent
ed331e717b
commit
753afb0d30
1 changed files with 3 additions and 1 deletions
|
|
@ -294,7 +294,9 @@ class Client(Generic[ClientTransportT]):
|
|||
and not self._session_task.cancelled()
|
||||
):
|
||||
exception = self._session_task.exception()
|
||||
if exception is not None:
|
||||
if isinstance(exception, httpx.HTTPStatusError):
|
||||
raise exception
|
||||
elif exception is not None:
|
||||
raise RuntimeError(
|
||||
f"Client failed to connect: {exception}"
|
||||
) from exception
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue