aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-05-27 13:54:56 +0300
committerFrederick Muriuki Muriithi2022-05-27 13:54:56 +0300
commit33150886d1463f23df24e2026d0c4d0da72a7b6b (patch)
tree4437fe085b127c774f4e060c3ef5ace60f8d40b9
parent45d3f2b14db7aa473facf3d051302716846d6fa2 (diff)
downloadgenenetwork2-33150886d1463f23df24e2026d0c4d0da72a7b6b.tar.gz
Display correlation computation errors correctly
- Display any correlation computation errors in a form that tells the user what they did wrong.
-rw-r--r--wqflask/wqflask/partial_correlations_views.py2
-rw-r--r--wqflask/wqflask/templates/partial_correlations/pcorrs_error.html3
2 files changed, 3 insertions, 2 deletions
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/<command_id>", 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 @@
</div>
<p>
- (GeneNetwork error: {{message[:128]}})
+ GeneNetwork error:<br />
+ {{message}}
</p>
<p>