Skip to content

Commit 6a2dd0a

Browse files
Merge branch 'master' into introduce-chatbot-client
2 parents 82740f3 + 20160d7 commit 6a2dd0a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/service-library/src/servicelib/fastapi/http_client_thin.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Any
77

88
from common_library.errors_classes import OsparcErrorMixin
9-
from httpx import AsyncClient, ConnectError, HTTPError, PoolTimeout, Response
9+
from httpx import AsyncClient, HTTPError, PoolTimeout, Response, TransportError
1010
from httpx._types import TimeoutTypes, URLTypes
1111
from servicelib.tracing import TracingConfig
1212
from tenacity import RetryCallState
@@ -134,7 +134,6 @@ def decorator(
134134

135135
@functools.wraps(request_func)
136136
async def request_wrapper(zelf: "BaseThinClient", *args, **kwargs) -> Response:
137-
# pylint: disable=protected-access
138137
try:
139138
async for attempt in AsyncRetrying(
140139
stop=stop_after_delay(
@@ -143,7 +142,7 @@ async def request_wrapper(zelf: "BaseThinClient", *args, **kwargs) -> Response:
143142
else zelf.total_retry_interval
144143
),
145144
wait=wait_exponential(min=1),
146-
retry=retry_if_exception_type((ConnectError, PoolTimeout)),
145+
retry=retry_if_exception_type(TransportError),
147146
before_sleep=before_sleep_log(_logger, logging.WARNING),
148147
after=_after_log(_logger),
149148
reraise=True,

0 commit comments

Comments
 (0)