From 80e41e6b44e0f812f94ae4c7fd899d13fe6059c6 Mon Sep 17 00:00:00 2001 From: David Shen <2984600+pantherman594@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:47:07 -0400 Subject: [PATCH] Attempt to query on error condition and print trace (#1131) --- app/routes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/routes.py b/app/routes.py index 331f4e8..27787c9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -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(