From 3ae00d190dfe3dc9abf338e498694b7876f8eb53 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Wed, 13 Oct 2021 12:03:48 -0400 Subject: [PATCH] Raise error if we have a problem sending email. This should be processed by Spiff ultimately. --- crc/services/email_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crc/services/email_service.py b/crc/services/email_service.py index 86810faa..20006827 100644 --- a/crc/services/email_service.py +++ b/crc/services/email_service.py @@ -47,9 +47,11 @@ class EmailService(object): msg.attach(file['name'], file['type'], file_data.data) mail.send(msg) + except Exception as e: app.logger.error('An exception happened in EmailService', exc_info=True) app.logger.error(str(e)) + raise e db.session.add(email_model) db.session.commit()