Skip to content

Improve error handling and helpers for failed tasks #416

@ybastide

Description

@ybastide

Context

We noticed it would be helpful, when a workflow fails, to have more information on the underlying activity and error details to provide helpful information to help diagnosing why the workflow failed.

Tech details

Current approach

When handling a failure in a workflow, we have access to the failure context via simpleflow.task.TaskFailureContext, which exposes:

  • the underlying exception: failure_context.exception
  • helper properties to cache and access selected exception details: failure_context.{task_name, task_error, task_error_type}

Possible improvements

It would be helpful to have access to additional information regarding the underlying exception in a straightforward way, with all fields at the same level, e.g.:

  • directly access the exception attribute (without extra caching) and its own attributes
  • provide the exception context and details:
    • failed task name
    • exception type
    • exception message (reason)
    • extra details specific to TaskFailed exceptions:
      • error
      • error type

The resulting improvements should be documented under the Features / Error Handling section.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions