Code AnalysisHard 60s
Saga: non-idempotent compensation
async function refundPayment(chargeId, amount) {
await payments.refund(chargeId, amount); // may be retried on timeout
}
// Called as a saga compensating action after a failed step.
What bug emerges if the timeout occurs after the refund succeeded?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.