From 1977f230b525181b46ab576756902b7dda5c9d90 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 914713c29aa5..16d852cd3116 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):