API Design · Senior · Question 58 of 75
How should an API communicate that a request was partially applied and can't be safely retried?
- ✓Correct answer: Avoid it by design (atomic operations or idempotency); otherwise return an explicit status and an operation resource describing what was applied
- 2Return 500 and let the client guess
- 3Return 200
Explanation
Ambiguous partial failures are the hardest errors for clients to handle correctly.