Rather than aborting after the first failure (e.g. 400 Bad Request), we should try harder to keep going.
Perhaps: Keep a counter of the recent file failures, and stop after some number (5?) of consecutive failures. Reset to 0 after every success. Also keep track of whether any failure ever occurred, and set the exit status appropriately.
Rather than aborting after the first failure (e.g. 400 Bad Request), we should try harder to keep going.
Perhaps: Keep a counter of the recent file failures, and stop after some number (5?) of consecutive failures. Reset to 0 after every success. Also keep track of whether any failure ever occurred, and set the exit status appropriately.