Skip to content

Commit

Permalink
Fix HEAD not being retried for HTTP 500 category responses. See #579
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Apr 14, 2023
1 parent d00cf4b commit d257b9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,11 @@ class BaseUpload {
if (status === 423) {
this._emitHttpError(req, res, 'tus: upload is currently locked; retry later')
return
} else if (inStatusCategory(status, 500)) {
// Run retry logic if the server has an error, e.g. 502 Bad Gateway when
// proxied server is temporarily down. See issue #579.
this._emitHttpError(req, res, 'tus: resuming upload resulted in HTTP 500 category error')
return
}

if (inStatusCategory(status, 400)) {
Expand Down

0 comments on commit d257b9b

Please sign in to comment.