diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/correlation_error_page.html | 5 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/correlation_error_page.html b/wqflask/wqflask/templates/correlation_error_page.html index 9197e4a9..7d11daf0 100644 --- a/wqflask/wqflask/templates/correlation_error_page.html +++ b/wqflask/wqflask/templates/correlation_error_page.html @@ -14,5 +14,10 @@ <div class="container"> <h3 style="color: red;">{{error["error-type"]}}</h3> <p>{{error["error-message"]}}</p> + <p style="background-color: black; color: green;"> + {%for line in error["stderr-output"]%} + {{line}}<br /> + {%endfor%} + </p> </div> {%endblock%} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index c71ae3c3..69576cc4 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -902,10 +902,14 @@ def corr_compute_page(): if jobs.completed_erroneously(job): try: - ## The "parseable" error report is actually in STDOUT - output = json.loads(job.get("stdout") or "{}") + error_output = { + "error-type": "ComputeError", + "error-message": "There was an error computing the correlations", + **json.loads(job.get("stdout") or "{}"), + "stderr-output": job.get("stderr", "").split("\n") + } return render_template( - "correlation_error_page.html", error=output) + "correlation_error_page.html", error=error_output) except json.decoder.JSONDecodeError as jde: raise Exception(f"STDOUT: {job.get('stdout')}") from jde |