EnCiv / undebate

Not debates, but recorded online video Q&A with candidates so voters can quickly can get to know them, for every candidate, for every election, across the US.
Other
20 stars 14 forks source link

Retry upload if error #317

Open ddfridley opened 3 years ago

ddfridley commented 3 years ago

If in the user trys to post their video, but there is a communications error like:

[1] [2021-06-19T12:44:22.317] [ERROR] browser - 2021-06-19T19:42:15.096Z createParticipant.upload socket stream error: {} {
[1]   socketId: 'MEL8_DBoZPmM82NuAAAy',
[1]   userId: '5d5b74751e3b194174cd9b94'
[1] }
[1] [2021-06-19T12:44:22.317] [ERROR] browser - 2021-06-19T19:42:15.097Z createParticipant.upload blob stream error: {} {
[1]   socketId: 'MEL8_DBoZPmM82NuAAAy',
[1]   userId: '5d5b74751e3b194174cd9b94'
[1] }

detect this and either upload again, or give the user the option to upload again.

You can simulate a failure by going into the chrome debugger, after you have recorded a video (/candidate-conversation-candidate-recorder) but before you hit post. In the debugger, go to the Network tab, And the drop down that says "No throttling" and change it to Slow 3G. Then hit the Post button. Then go back to the drop down and change it to "offline". Then wait for a minute or two, and you will see the errors appear.