ecoacoustics / web-components

https://oe-web-components.netlify.app/
MIT License
1 stars 0 forks source link

Improve error handling when an audio file cannot be fetched #174

Open hudson-newey opened 1 month ago

hudson-newey commented 1 month ago

At the moment, if a single audio file cannot be fetched for a spectrogram in a verification grid, we hard fail, and the spectrogram grid never loads the page of results.

This can be annoying if you are half-way through a verification task, but the verification grid suddenly becomes unusable because a single audio file could not be fetched meaning that the loaded event could not be fired by the spectrogram, and all decision buttons are disabled.

Meaning that the only way to resolve the issue is to reload the page, and perhaps edit your underlying dataset.

This can happen in real-life scenarios due to a flakey internet connection, or a single file having a mis-typed URL in the dataset.


I propose that after a certain amount of time (e.g. 10 seconds) we soft-fail by showing "retry" icons over the spectrogram placeholders, and enabling the decision buttons.

The tile will not be sub-selectable, and will have an empty cell when results are downloaded

atruskie commented 1 month ago

Yeah, a timeout is a good idea. Things should probably always automatically retry.

We should ideally already know if something is going to fail because of our cache ahead service. We could do something like filtering out anything that is not ready (maybe have a status indicator?).

If we get to the end and we have errored segments, it's probably worth not even showing them. Just put up a notice at the end: xx segments failed to load and were not shown.