Permanent Failure Retry Classification in Email Jobs
Level 1 · node · Reliability · Retry classification error
Scenario
An email delivery worker completes jobs or places them on a retry queue according to responses from an external mail provider. Temporary provider outages should be retried, but operations reports show that jobs rejected because of the recipient address are also retried repeatedly. The worker, mail client, and retry queue are separated.
Requirements
- A successful delivery completes as sent and does not enter the retry queue - A temporary provider failure returns retrying and creates exactly one retry entry - A permanent failure such as recipient rejection finishes as failed and does not enter the retry queue - Failure results preserve the error code returned by the provider
Acceptance criteria
- A successful delivery has sent status and creates no retry entry
- A temporary provider-unavailable error has retrying status and creates one retry entry
- A permanent recipient-rejected error has failed status and creates no retry entry
- Failure and retry results preserve the original provider error code