Skip to content

Commit

Permalink
Fix lookup of session key in error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Jan 19, 2024
1 parent f9d7aef commit bd30bac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/howitz/error_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def handle_generic_exception(e):
alert_random_id = str(uuid.uuid4())
short_err_msg = 'An unexpected error has occurred'

if not "errors" in session:
session["errors"] = dict()
session["errors"][str(alert_random_id)] = serialize_exception(e)
session.modified = True
current_app.logger.debug('ERRORS %s', session["errors"])
Expand Down

0 comments on commit bd30bac

Please sign in to comment.