Menu

The Key Expires in 24 Hours. The Retry Arrives on Monday.
πŸ“°

The Key Expires in 24 Hours. The Retry Arrives on Monday.

DEV Community: backendΒ·AheadKitΒ·11 days ago
#KUYfYP2L
#devtobackend#devto#dev#provider#retry
Long article (1214 words) β€” no AI summary yet.
Reading 0:00
15s threshold

itsvicmoreno left a comment on my last piece about the crash between the key insert and the charge, and it named the hole my run never tested. My rig crashed the receiver between writing the key and charging the card, in both orders, and measured what each shape lost. But every retry in that run arrived seconds later, while the provider still held the key. itsvicmoreno asked about the retry that arrives after the key is gone.

The provider's own docs say an idempotency key can be pruned once it is at least 24 hours old. A retry that waits past that, a dead-letter replay after a weekend outage or a row reclaimed the next day, is treated as a brand-new request. The shape as I ran it never tested a retry outside the window. So I built the weekend: same event, same $29 payment for order ORD-1042, a crash after the first charge lands, and then the retry arriving 25 hours later, after the key has expired. Two candidate fixes, and one of them survives.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.