Handle download errors so the tasks don't get stuck in the task queue.