From 33150886d1463f23df24e2026d0c4d0da72a7b6b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 27 May 2022 13:54:56 +0300 Subject: Display correlation computation errors correctly - Display any correlation computation errors in a form that tells the user what they did wrong. --- wqflask/wqflask/partial_correlations_views.py | 2 +- wqflask/wqflask/templates/partial_correlations/pcorrs_error.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py index f567cee3..7456ae2e 100644 --- a/wqflask/wqflask/partial_correlations_views.py +++ b/wqflask/wqflask/partial_correlations_views.py @@ -340,7 +340,7 @@ def process_pcorrs_command_output(result): format_number=__format_number) if result["status"] == "error": return render_error( - "The partial correlations computation failed with an error") + f"({result['error_type']}: {result['message']})") @app.route("/partial_correlations/", methods=["GET"]) def poll_partial_correlation_results(command_id): diff --git a/wqflask/wqflask/templates/partial_correlations/pcorrs_error.html b/wqflask/wqflask/templates/partial_correlations/pcorrs_error.html index 2bcb5e02..91f6baf2 100644 --- a/wqflask/wqflask/templates/partial_correlations/pcorrs_error.html +++ b/wqflask/wqflask/templates/partial_correlations/pcorrs_error.html @@ -32,7 +32,8 @@

- (GeneNetwork error: {{message[:128]}}) + GeneNetwork error:
+ {{message}}

-- cgit v1.2.3