#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum ContainerError {
#[error("container engine unavailable: {detail}")]
EngineUnavailable { detail: String },
#[error("no such container: {name}")]
NoSuchContainer { name: String },
#[error("container is not running: {id}")]
NotRunning { id: String },
#[error(
"stale container identity for {name}: held incarnation {expected}, engine reports {found}"
)]
StaleIdentity {
name: String,
expected: String,
found: String,
},
#[error("no such path in container {id}: {path}")]
NoSuchPath { id: String, path: String },
#[error("capability refused: {what}")]
CapabilityRefused { what: String },
#[error("unsafe container name refused: {name:?}")]
PoisonedName { name: String },
#[error("bounded output exceeded: {what}")]
OutputTooLarge { what: String },
#[error("malformed engine response: {detail}")]
Protocol { detail: String },
#[error("operation cancelled")]
Cancelled,
#[error("engine I/O: {detail}")]
Io { detail: String },
}