Adjust error email formatting.

This commit is contained in:
Sage Vaillancourt 2022-10-02 15:12:19 -04:00
parent 0b6738aad1
commit 3e69d39aef
1 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,7 @@ Or copy and paste this link into your browser: {reset_link}
def exception_alert(e: Exception):
exception_text = 'Exception Message: ' + str(e) + '\n' + ''.join(traceback.format_exception(None, e, e.__traceback__))
data = {
'Messages': [
{
@ -55,7 +56,8 @@ def exception_alert(e: Exception):
},
"To": [{"Email": "sage@sagev.space"}],
"Subject": "UnderCover Internal Error",
"TextPart": str(e) + '\n' + ''.join(traceback.format_exception(None, e, e.__traceback__)),
"TextPart": exception_text,
"HTMLPart": f"<pre>{exception_text}</pre>",
"CustomID": "InternalServerError"
}
]