Skip to content

Commit bd859d6

Browse files
committed
fix(rest): add ConnectionResetError to retryable exceptions
The REST connector now catches ConnectionResetError in addition to RequestsConnectionError during requests. This ensures that the built-in retry logic is triggered when a connection is reset by the peer, improving resilience against transient network issues.
1 parent a95b52c commit bd859d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

odev/common/connectors/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _request(
269269
logger_message
270270
+ f" -> [{response.status_code}] {response.reason} ({response.elapsed.total_seconds():.3f} seconds)"
271271
)
272-
except RequestsConnectionError as error:
272+
except (RequestsConnectionError, ConnectionResetError) as error:
273273
if retry_on_error:
274274
logger.debug(error)
275275
return self._request(

0 commit comments

Comments
 (0)