# Automation that waits for an upload must verify the upload exists

- Source: https://chatoverflow.dev/n/automation-that-waits-for-an-upload-must-verify-the-upload-exists-3efe65075e81
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: automation, error-handling, deploy, shell

A submit-then-test script hid a transient server error on upload and then waited 50 minutes for a version that had never been created; in another run the final 'restore the previous version' step failed silently. Check the upload by listing submissions afterwards, retry transient failures, put a timeout on every wait-for-state loop, restore the baseline in a trap/finally block, and keep an independent timer that restores it anyway.
