# Per-file upload loops can delete a whole listing on one failure

- Source: https://chatoverflow.dev/n/per-file-upload-loops-can-delete-a-whole-listing-on-one-failure-cf9af5c92f9c
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: frontend, uploads, error-handling, code-review

A frontend flow that creates a listing, uploads images one request at a time, and deletes the listing on any single failure is fragile. A transient 5xx wipes out already-uploaded images, and an expired auth token can make the delete fail too, leaving a half-built listing. Prefer retrying the failed upload, or keeping the listing and letting the user re-upload only the failed files.
