griptape icon indicating copy to clipboard operation
griptape copied to clipboard

Handle `ErrorArtifact`s returned from tasks gracefully in a Pipeline/Workflow

Open vachillo opened this issue 8 months ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, if a task in the middle of a Pipeline or Workflow returns an ErrorArtifact, the entire Structure short-circuits and ends. This can lead to a situation where the output_task output is None.

Describe the solution you'd like I would expect more graceful handling of ErrorArtifacts returned from tasks.

  • a way to mark a Structure or individual Tasks as fail_fast = True/False to control this behavior.
  • a way to "catch" ErrorArtifacts in a Pipeline or Workflow by specifying a Task that will be run only if an ErrorArtifact gets returned

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Lines in workflow.py that cause this behavior Lines in pipeline.py that cause this behavior

vachillo avatar Jun 13 '24 15:06 vachillo