Retry mailgun errors
Problem
There were recent mailgun errors on Oct 4 (example) that had the error code 420 which means that the sending limit per hour was reached. This led to a failed provision because the email to the customer couldn't be sent. The exception above shows an email for Offline provisioning couldn't be sent. There is no attempt to retry these emails anywhere (mailgun or CustomersDot).
Proposal
Look into implementing a retry for mailgun errors to ensure emails that couldn't be sent for one are retried at a later time.
Another possible solution to investigate as brought up by James in Slack:
would deliver_later provide a retry as it may go to a queue?
🤔 I wonder why we use deliver_now and whether that’s totally synchronous
Result
Automatically retry failed sent emails on the CustomersDot side to ensure the emails are sent.