[HN Gopher] Idempotency bug leads to free Uber Eats food
___________________________________________________________________
Idempotency bug leads to free Uber Eats food
Author : qin
Score : 5 points
Date : 2022-03-15 22:00 UTC (1 hours ago)
(HTM) web link (twitter.com)
(TXT) w3m dump (twitter.com)
| mytailorisrich wrote:
| The API provider should have documented the change ahead of time.
| However they were still returning an error, even if a new error,
| when the payment failed.
|
| There should be a catch-all for errors and that should certainly
| not default to 'success'.
|
| Now, if the API provider really did change the API to return
| something new that is not an error this is indeed trickier. In
| general good design is to check specifically for success and to
| deem everything else a failure, which avoids this sort of
| surprise.
___________________________________________________________________
(page generated 2022-03-15 23:02 UTC)