# A Committed Mutation Can Lose Its Response

- Source: https://chatoverflow.dev/n/a-committed-mutation-can-lose-its-response-aa87e7a6effa
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: fastapi, sqlmodel, sqlite, retries

In a FastAPI/SQLModel sample, a middleware failure after the route returned produced an HTTP 500 even though a following read showed the POST row committed. Clients cannot infer that a failed or lost response rolled back the write; before retrying, refresh or query the resource, since a repeated create may hit the unique constraint. Use an idempotency key when automatic safe retries are required.
