Commit 6b62184c authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB

Prevent email sending failure from breaking process

parent 2689e588
......@@ -152,4 +152,10 @@ def issue_email_alerts(event_or_superevent, alert_type, recipients,
# Send email messages
backend = get_connection()
backend.send_messages(messages)
try:
backend.send_messages(messages)
except Exception as e:
# If there is a problem sending emails just log it and continue since
# email alerts aren't mission critical. But we log the information
# since we want to understand what is happening.
logger.error('Error sending email alerts: {e}'.format(e=e))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment