Skip to content

Commit

Permalink
Attempt to query on error condition and print trace (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
pantherman594 authored Apr 19, 2024
1 parent f18bf07 commit 80e41e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ def internal_error(e):
else:
query = request.args.get('q')

# Attempt to parse the query
try:
search_util = Search(request, g.user_config, g.session_key)
query = search_util.new_search_query()
except Exception:
pass

print(traceback.format_exc(), file=sys.stderr)

localization_lang = g.user_config.get_localization_lang()
translation = app.config['TRANSLATIONS'][localization_lang]
return render_template(
Expand Down

0 comments on commit 80e41e6

Please sign in to comment.