Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling and helpers for failed tasks #416

Open
ybastide opened this issue Jul 13, 2023 · 0 comments
Open

Improve error handling and helpers for failed tasks #416

ybastide opened this issue Jul 13, 2023 · 0 comments
Assignees

Comments

@ybastide
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant