A booking request times out. Can the client assume it failed?
After this you can answer: A booking request times out. Can the client assume it failed?
Say it in 30 seconds
Section titled “Say it in 30 seconds”The deeper answer
Section titled “The deeper answer”There are several possible timelines: the request never reached the API, the transaction rolled back, or it committed and the response disappeared. The browser cannot distinguish them from a network error alone. Sending the same parameters with the same user-scoped key makes that distinction unnecessary for correctness.
The retry helper permits two retries, giving at most three attempts. A 4xx response is not automatically retried. A 5xx or missing HTTP status may be ambiguous, so the idempotency contract makes those retries safe. This is specific to booking; arbitrary mutations should not gain retries by default.
Backoff limits immediate load, but it cannot prove completion. After retries are exhausted, the product should let the customer reconcile their booking rather than state that nothing happened. My tickets is a useful recovery view, while a durable intent history would strengthen recovery across a browser restart.
Counter-questions
Section titled “Counter-questions”Why not retry with a new key?
What if the server returns 409?
Would a longer timeout fix this?
Where in MiniTickets
Section titled “Where in MiniTickets”Read Idempotency, then inspect the api-app piece →.
apps/web/src/features/bookings/lib/booking-retry.ts → shouldRetryBookingRead this book online: https://book.theversehub.in/