Send notification when we encounter an error
This commit is contained in:
parent
c03b69b351
commit
df7f72245a
@ -11,7 +11,6 @@ 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):
|
||||
@ -21,7 +20,7 @@ def log_error(e):
|
||||
|
||||
def handle_error(e, message="Not Found", code=404):
|
||||
log_error(e)
|
||||
notification_sender.send(message)
|
||||
current_app.notification_sender.send(message)
|
||||
return render_template("error.html", message=message), code
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ import tests.factories as factories
|
||||
from tests.mocks import PDF_FILENAME, PDF_FILENAME2
|
||||
from tests.utils import FakeLogger
|
||||
|
||||
from datetime import datetime, timezone, timedelta
|
||||
from datetime import datetime, timedelta
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
Loading…
x
Reference in New Issue
Block a user