From 4140efdad9b6af64b21d6f25acb20faf512edd84 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 28 Feb 2024 17:27:24 +0100 Subject: [PATCH] make the max discovered files error a "proper" job error message --- lib/galaxy/jobs/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index feea8c6db3ab..86c43b45ed7c 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -75,6 +75,7 @@ check_output, DETECTED_JOB_STATE, ) +from galaxy.tool_util.parser.stdio import StdioErrorLevel from galaxy.tools.evaluation import ( PartialToolEvaluator, ToolEvaluator, @@ -1939,7 +1940,13 @@ def fail(message=job.info, exception=None): self.discover_outputs(job, inp_data, out_data, out_collections, final_job_state=final_job_state) except MaxDiscoveredFilesExceededError as e: final_job_state = job.states.ERROR - job.job_messages = [str(e)] + job.job_messages = [ + { + "type": "internal", + "desc": str(e), + "error_level": StdioErrorLevel.FATAL, + } + ] for dataset_assoc in output_dataset_associations: if getattr(dataset_assoc.dataset, "discovered", False):