diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index 7822f226feaa..5fe5d4b3a112 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -1907,7 +1907,7 @@ def fail(message=job.info, exception=None): job.set_state(final_job_state) return fail(f"Job {job.id}'s output dataset(s) could not be read") - job_context = ExpressionContext(dict(stdout=job.stdout, stderr=job.stderr)) + job_context = ExpressionContext(dict(stdout=tool_stdout, stderr=tool_stderr)) if extended_metadata: try: import_options = store.ImportOptions(allow_dataset_object_edit=True, allow_edit=True)