Handling Email API Timeouts in Order Report Delivery
An email API timeout should be treated as an unknown delivery state rather than a confirmed failure, since the server may have accepted the message even though no response arrived. The article recommends recording an idempotency key before the first send attempt and separating connection, request, and delivery deadlines to pinpoint where delays occur. Attachment generation should move out of the synchronous request path, with the web request only enqueuing a durable job that a worker processes. Retries are only safe when the receiver supports idempotency or the outcome can be reconciled, otherwise duplicate emails may be sent. Deadlines should be chosen per workflow phase and kept in configuration.
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