-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HEAD request is not retried on intermittent server errors such as 502 Bad Gateway #579
Comments
It also looks to me that Lines 656 to 660 in 01d3948
is too general. For example, HTTP It seems that a better approach is to list exactly the cases in which new uploads are created without calling the user's Similar to Line 1013 in 01d3948
|
Good point. We can add an exception for 429 to handle it the same way as 423 is done. |
In
tus-js-client/lib/upload.js
Lines 632 to 676 in 01d3948
the logic results in
HEAD
requests giving e.g. HTTP502 Bad Gateway
not being retried; instead a new upload is started immediately. The user-definedonShouldRetry()
is unexpectedly not called.This is inconsistent with other parts of
tus-js-client
:PATCH
requests are retriedPOST
requests to create new uploads are retried on HTTP 502, because oftus-js-client/lib/upload.js
Lines 592 to 593 in 01d3948
where
_emitHttpError()
calls_emitError()
which has the retry logic (shouldRetry()
callingonShouldRetry()
)To Reproduce
502 Bad Gateway
is generated by the reverse proxyPlease try to reproduce the problem when uploading to our public tus instance at https://tusd.tusdemo.net/files/, if applicable to your situation. This helps us to determine whether the problem may be caused by the server component.
Expected behavior
HEAD
retries the same way asPATCH
.onShouldRetry()
should be called forHEAD
the same way as forPATCH
, so that the user can implement error handling.The text was updated successfully, but these errors were encountered: