Skip to content

Commit 95ed886

Browse files
committed
Add logging and flash in csrf handler
1 parent e04ea21 commit 95ed886

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def create_app() -> Quart:
6363

6464
@app.errorhandler(CSRFError)
6565
async def handle_csrf_error(e):
66+
logging.exception(e.description)
67+
await flash("Session expired!", "danger")
6668
if "url" in session and session["url"]:
6769
return redirect(session["url"]), 400
6870
else:

0 commit comments

Comments
 (0)