Skip to content

Commit

Permalink
better error message in task input stager
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Jan 5, 2024
1 parent 9aba6a8 commit 723e391
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/engine/src/core/tasks/TaskInputFileStagingService.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ def stage(self, task: Task):
task_id=value_from[key].task_id,
_id=value_from[key].output_id
)
except Exception:
raise TaskInputStagingError(f"No output found for task '{value_from[key].task_id}' with output id of '{value_from[key].output_id}'")
except Exception as e:
raise TaskInputStagingError(f"No output found for task '{value_from[key].task_id}' with output id of '{value_from[key].output_id}' | {e}")
if key == "args":
try:
value = self._value_from_service.get_arg_value_by_key(
value_from[key]
)
except Exception:
raise TaskInputStagingError(f"Error attempting to fetch value from args at key '{key}'")
except Exception as e:
raise TaskInputStagingError(f"Error attempting to fetch value from args at key '{value_from[key]}' | {e}")
if key == "env":
try:
value = self._value_from_service.get_env_value_by_key(
value_from[key]
)
except Exception:
raise TaskInputStagingError(f"Error attempting to fetch value from env at key '{key}'")
except Exception as e:
raise TaskInputStagingError(f"Error attempting to fetch value from env at key '{value_from[key]}' | {e}")

self._create_input_(task, input_id, value)

Expand Down

0 comments on commit 723e391

Please sign in to comment.