temporalio / temporalio/features
Add utility function to classify exceptions as failing the workflow vs failing the task
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 32
- Forks
- 28
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
See the waiting_for_handlers and waiting_for_handlers_and_compensation Python samples added in https://github.com/temporalio/samples-python/pull/144, which feature a utility function like this:
def is_workflow_exit_exception(e: BaseException) -> bool:
"""
True if the exception is of a type that will cause the workflow to exit.
This is as opposed to exceptions that cause a workflow task failure, which
are retried automatically by Temporal.
"""
# 👉 If you have set additional failure_exception_types you should also
# check for these here.
return isinstance(e, (asyncio.CancelledError, exceptions.FailureError))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the waiting_for_handlers and waiting_for_handlers_and_compensation Python samples in samples-python pull request 144, then compare their exception handling with this feature request. Done means the project has a utility that distinguishes exceptions causing workflow exit from those causing retryable workflow-task failure, including the documented handling of additional failure exception types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100