Timeouts can hide sent emails: why retries risk duplicate messages
A developer who builds back-office systems for small Italian companies warns that AI-written email code often retries after timeouts, which can send customers duplicate messages. The core problem is that a timeout does not prove the email failed to send, since the provider may have already delivered it. The author recommends defaulting to an 'uncertain' outcome for ambiguous write failures rather than retrying automatically. Read-only requests can be retried safely with backoff and jitter, but calls that write, such as sending emails or charging cards, need different handling. The proposed approach claims each email in the database before sending, so that restarts or background jobs cannot resend it, and flags uncertain cases for human review.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in