From f81419a641172e81e2a1ec1e38e626baeb12bd90 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 21 Feb 2020 12:28:46 -0600 Subject: Added try/except to mapping just to intercept all possible errors and give a nicer error page --- wqflask/wqflask/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 7826c98f..90fd798d 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -675,10 +675,12 @@ def mapping_results_page(): else: logger.info("Cache miss!!!") with Bench("Total time in RunMapping"): - template_vars = run_mapping.RunMapping(start_vars, temp_uuid) - - if template_vars.no_results: - rendered_template = render_template("mapping_error.html") + try: + template_vars = run_mapping.RunMapping(start_vars, temp_uuid) + if template_vars.no_results: + rendered_template = render_template("mapping_error.html") + except: + rendered_template = render_template("mapping_error.html") else: #if template_vars.mapping_method != "gemma" and template_vars.mapping_method != "plink": template_vars.js_data = json.dumps(template_vars.js_data, -- cgit v1.2.3