aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/views.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index f2d20eef..c71ae3c3 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -901,9 +901,13 @@ def corr_compute_page():
return render_template("correlation_page.html", **output)
if jobs.completed_erroneously(job):
- ## The "parseable" error report is actually in STDOUT
- output = json.loads(job.get("stdout", "{}"))
- return render_template("correlation_error_page.html", error=output)
+ try:
+ ## The "parseable" error report is actually in STDOUT
+ output = json.loads(job.get("stdout") or "{}")
+ return render_template(
+ "correlation_error_page.html", error=output)
+ except json.decoder.JSONDecodeError as jde:
+ raise Exception(f"STDOUT: {job.get('stdout')}") from jde
return render_template("loading_corrs.html")