Pipeline Exceptions¶
Exception hierarchy for the pipeline (workflow execution) subsystem.
Exception Hierarchy¶
KstlibError
└── PipelineError
├── PipelineConfigError (also ValueError)
├── PipelineAbortedError
└── StepError
├── StepTimeoutError
└── StepImportError
Base Exception¶
Configuration Errors¶
- exception kstlib.pipeline.exceptions.PipelineConfigError[source]¶
Bases:
PipelineError,ValueErrorPipeline configuration is invalid.
Raised when the pipeline or step configuration contains invalid values, missing required fields, or constraint violations.
Raised when pipeline or step configuration is invalid (missing fields, constraint violations, unknown types).
Execution Errors¶
- exception kstlib.pipeline.exceptions.PipelineAbortedError(step_name, reason)[source]¶
Bases:
PipelineErrorPipeline execution was aborted due to fail_fast policy.
Raised when a step fails and the error policy is
fail_fast, causing the remaining steps to be skipped.- step_name¶
Name of the step that caused the abort.
- reason¶
Description of why the step failed.
- exception kstlib.pipeline.exceptions.StepError(step_name, reason)[source]¶
Bases:
PipelineErrorA pipeline step failed during execution.
- step_name¶
Name of the step that failed.
- reason¶
Description of the failure.
- exception kstlib.pipeline.exceptions.StepTimeoutError(step_name, timeout)[source]¶
Bases:
StepErrorA pipeline step exceeded its timeout.
- step_name¶
Name of the step that timed out.
- timeout¶
The timeout value in seconds.
Usage Examples¶
from kstlib.pipeline.exceptions import (
PipelineError,
PipelineAbortedError,
PipelineConfigError,
StepError,
StepTimeoutError,
StepImportError,
)
try:
result = runner.run()
except PipelineAbortedError as e:
print(f"Pipeline aborted at step '{e.step_name}': {e.reason}")
except StepTimeoutError as e:
print(f"Step '{e.step_name}' timed out after {e.timeout}s")
except StepImportError as e:
print(f"Cannot import '{e.target}' for step '{e.step_name}'")
except PipelineConfigError as e:
print(f"Invalid config: {e}")
except PipelineError as e:
print(f"Pipeline error: {e}")