Logging refactor to make debugging easier. Before the filename needed to

be known. Added the notification id to the logging message so that
the notification can be traced through the logging system by knowing
the notification id, making it easier to debug. Also changed to raise an
exception so that alerts are generated. This way we should get an email
to say that there has been an error.
This commit is contained in:
Richard Chapman
2018-04-03 12:31:52 +01:00
parent 023862dfdc
commit f1abce22ae
3 changed files with 21 additions and 5 deletions

View File

@@ -10,6 +10,12 @@ from jsonschema import ValidationError as JsonSchemaValidationError
from app.authentication.auth import AuthError
class VirusScanError(Exception):
def __init__(self, message):
super().__init__(message)
class InvalidRequest(Exception):
code = None
fields = []