Browse Source

Treat all email sending exceptions the same

In the previous commit, we forgot to remove requests that trigger
exceptions other than SMTPClientError.
merge-requests/14/merge
Cecylia Bocovich 1 year ago
parent
commit
fc9e1ed212
  1. 7
      gettor/services/email/sendmail.py

7
gettor/services/email/sendmail.py

@ -230,14 +230,9 @@ class Sendmail(object):
id=id, service="email", date=date
)
except smtp.SMTPClientError as e:
except Exception as e:
yield self.conn.remove_request(
id=id, service="email", date=date
)
log.error(strings.redact_emails(
"Error sending email to {}:{}.".format(id, e)))
except Exception as e:
log.error(
strings.redact_emails("Error sending email:{}.".format(e))
)

Loading…
Cancel
Save