Wire up NotificationSender to the app's error handler

This commit is contained in:
richard-dds
2019-05-13 11:40:54 -04:00
parent a6c5f484b9
commit aaa9d47ccf
2 changed files with 6 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ from atst.domain.invitations import (
from atst.domain.authnid.crl import CRLInvalidException
from atst.domain.portfolios import PortfolioError
from atst.utils.flash import formatted_flash as flash
from atst.utils.notification_sender import notification_sender
def log_error(e):
@@ -20,6 +21,7 @@ def log_error(e):
def handle_error(e, message="Not Found", code=404):
log_error(e)
notification_sender.send(message)
return render_template("error.html", message=message), code