When resuming an upload, we first check for the batch ID validity using that pseudo-code:
This is bad: we are catching all exceptions. And if the server is busy (likely when uploading a big file) it may return a HTTP error 502, 503 or 504. And those errors are not telling us that the batch ID is inexistant.
We should only catch the specific HTTP error 404.
Other errors will propagate to the upper level and will be handled accordingly.