yaml_workflow.tasks.error_handling¶
yaml_workflow.tasks.error_handling
¶
Centralized error handling utilities for tasks.
Classes¶
ErrorContext
dataclass
¶
Data class to hold context information about a task error.
Source code in src/yaml_workflow/tasks/error_handling.py
Functions¶
handle_task_error(context: ErrorContext) -> None
¶
Centralized error handling logic for tasks.
Logs the error and re-raises it, wrapping non-TaskExecutionErrors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
context
|
ErrorContext
|
An ErrorContext object containing details about the error. |
required |
Raises:
Type | Description |
---|---|
TaskExecutionError
|
Always raises a TaskExecutionError, either the original one or a newly created wrapper. |