Send error mail to admin

Closes: #73
This commit is contained in:
Edward Betts 2023-12-07 17:15:58 +00:00
parent 9ff61c3af8
commit 0465e5eddd
2 changed files with 75 additions and 0 deletions

View file

@ -15,12 +15,15 @@ import werkzeug.debug.tbtools
import yaml
import agenda.data
import agenda.error_mail
import agenda.travel
app = flask.Flask(__name__)
app.debug = False
app.config.from_object("config.default")
agenda.error_mail.setup_error_mail(app)
@app.errorhandler(werkzeug.exceptions.InternalServerError)
def exception_handler(e: werkzeug.exceptions.InternalServerError) -> tuple[str, int]: