From 7aef02fc161b2e1888ee944a6225297995477c50 Mon Sep 17 00:00:00 2001 From: AbortingMission Date: Mon, 2 Jun 2025 07:26:12 -0400 Subject: [PATCH] Add 0 to list of retry codes The error ERR_NETWORK_CHANGED returns status code 0 and happens when switching from Wi-Fi networks, or a brief wifi signal inturruption. Library should handle such cases gracefully. --- src/upchunk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upchunk.ts b/src/upchunk.ts index b755aa1..f27052b 100644 --- a/src/upchunk.ts +++ b/src/upchunk.ts @@ -248,7 +248,7 @@ export class ChunkedFileIterable implements ChunkedIterable { } const SUCCESSFUL_CHUNK_UPLOAD_CODES = [200, 201, 202, 204, 308]; -const TEMPORARY_ERROR_CODES = [408, 502, 503, 504]; // These error codes imply a chunk may be retried +const TEMPORARY_ERROR_CODES = [408, 502, 503, 504, 0]; // These error codes imply a chunk may be retried const RESUME_INCOMPLETE_CODES = [308]; type UploadPredOptions = {