mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 02:38:58 +00:00
@uppy/tus: retry on 423 HTTP error code (#4512)
This commit is contained in:
parent
147e5da96f
commit
2b9958c4f8
1 changed files with 3 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue