Include exception info in SMS warning log

This makes it easier to debug failures when adding a new provider.
This commit is contained in:
Ben Thorner
2022-03-25 12:35:22 +00:00
parent e6e16a81d0
commit 3988a6cd07

View File

@@ -24,7 +24,8 @@ def deliver_sms(self, notification_id):
except Exception as e:
if isinstance(e, SmsClientResponseException):
current_app.logger.warning(
"SMS notification delivery for id: {} failed".format(notification_id)
"SMS notification delivery for id: {} failed".format(notification_id),
exc_info=True
)
else:
current_app.logger.exception(