From 2b9958c4f8faee85b3c922555efe2c0109d7a2fb Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 20 Jun 2023 11:17:56 +0200 Subject: [PATCH] @uppy/tus: retry on 423 HTTP error code (#4512) --- packages/@uppy/tus/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/tus/src/index.js b/packages/@uppy/tus/src/index.js index bfff91257..1b053c1e3 100644 --- a/packages/@uppy/tus/src/index.js +++ b/packages/@uppy/tus/src/index.js @@ -302,8 +302,10 @@ export default class Tus extends BasePlugin { } this.requests.rateLimit(next.value) } - } else if (status > 400 && status < 500 && status !== 409) { + } else if (status > 400 && status < 500 && status !== 409 && status !== 423) { // HTTP 4xx, the server won't send anything, it's doesn't make sense to retry + // HTTP 409 Conflict (happens if the Upload-Offset header does not match the one on the server) + // HTTP 423 Locked (happens when a paused download is resumed too quickly) return false } else if (typeof navigator !== 'undefined' && navigator.onLine === false) { // The navigator is offline, let's wait for it to come back online.