Expand description
Deployment error taxonomy for the Rustlift pipeline.
This module defines a single, exhaustive error type — DeployError —
that every fallible function in the crate returns. Each variant maps to
a distinct failure domain (network, config, build, etc.), and the
crate::resilience::reliable_op wrapper uses this taxonomy to decide
whether to retry or abort immediately.
§Learning: Why a Single Error Enum?
In Rust, error handling follows a principle: errors are values, not exceptions. By collecting every failure mode into one enum, callers can pattern-match exhaustively. The compiler guarantees that you have handled every case — no uncaught exceptions, no surprise panics.
The #[derive(Error)] macro from the thiserror crate generates
the boilerplate implementations of std::fmt::Display and
std::error::Error automatically, keeping this file concise.
§Fatal vs. Transient
The retry layer in crate::resilience uses a simple rule:
| Category | Variants | Behaviour |
|---|---|---|
| Fatal | Config, Dependency, Build, PathEncoding | Abort immediately |
| Transient | Everything else | Retry with backoff |
Fatal errors stem from user mistakes (wrong config, missing tools) that no amount of retrying will fix. Transient errors stem from external systems (network blips, Azure throttling) that often resolve on their own.
Enums§
- Deploy
Error - Exhaustive error type for every failure mode in the deployment pipeline.
Type Aliases§
- Result
- Convenience alias used throughout the pipeline.