diff --git a/nmdc_automation/workflow_automation/watch_nmdc.py b/nmdc_automation/workflow_automation/watch_nmdc.py index c1ac6e08..d4640497 100644 --- a/nmdc_automation/workflow_automation/watch_nmdc.py +++ b/nmdc_automation/workflow_automation/watch_nmdc.py @@ -11,6 +11,7 @@ import linkml.validator import importlib.resources from functools import lru_cache +import traceback from nmdc_schema.nmdc import Database from nmdc_automation.api import NmdcRuntimeApi @@ -229,8 +230,9 @@ def process_successful_job(self, job: WorkflowJob) -> Database: try: workflow_execution = job.make_workflow_execution(data_objects) except Exception as e: - # job_dict = yaml.safe_load(yaml_dumper.dumps(job)) - logger.error(f"Error creating workflow execution record: {e} for job {job.opid}") + trace = traceback.format_exc() + logger.error(f"Error creating workflow execution: {e} for job {job.opid}") + logger.error(trace) # exit early if there is an error sys.exit(1) database.workflow_execution_set = [workflow_execution]