fix(api-nodes): random issues on Windows by capturing general OSError for retries (#10486)

This commit is contained in:
Alexander Piskun
2025-10-26 08:51:06 +02:00
committed by GitHub
parent f6bbc1ac84
commit 9d529e5308
3 changed files with 10 additions and 15 deletions

View File

@@ -290,7 +290,7 @@ async def upload_file(
return
except asyncio.CancelledError:
raise ProcessingInterrupted("Task cancelled") from None
except (aiohttp.ClientError, asyncio.TimeoutError) as e:
except (aiohttp.ClientError, OSError) as e:
if attempt <= max_retries:
with contextlib.suppress(Exception):
request_logger.log_request_response(
@@ -313,7 +313,7 @@ async def upload_file(
continue
diag = await _diagnose_connectivity()
if diag.get("is_local_issue"):
if not diag["internet_accessible"]:
raise LocalNetworkError(
"Unable to connect to the network. Please check your internet connection and try again."
) from e