Adjust error email formatting.
This commit is contained in:
parent
0b6738aad1
commit
3e69d39aef
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue