fix(api-nodes): random issues on Windows by capturing general OSError for retries (#10486)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user