#[non_exhaustive]pub enum Error {
Show 40 variants
Unsupported {
what: String,
},
Declined {
what: String,
},
Io {
path: PathBuf,
action: &'static str,
source: Error,
},
Locked {
run: String,
},
ToolMissing {
step: String,
tool: String,
},
ToolTooOld {
tool: String,
found: String,
required: String,
},
ToolFailed {
step: String,
reason: String,
},
ToolUnanswered {
step: String,
tool: String,
reason: String,
},
ToolDenied {
step: String,
tool: String,
reason: String,
},
CredentialsExpired {
step: String,
cloud: Option<Cloud>,
reason: String,
},
AddressPoolOverlap {
step: String,
reason: String,
},
Timeout {
step: String,
timed_out: TimedOut,
},
DownloadStalled {
what: DownloadKind,
step: String,
after_s: u64,
last_line: Option<String>,
},
DownloadFailed {
what: DownloadKind,
step: String,
reason: String,
},
AlreadyRunning {
run: String,
},
RunningElsewhere {
run: String,
recorded: String,
asked: String,
},
PortInUse {
port: HostPort,
protocol: String,
holder: Option<PortHolder>,
},
NotParkable {
run: String,
mode: &'static str,
},
NothingToResume {
run: String,
},
PartlyGone {
run: String,
machines: Vec<String>,
},
NotRunning {
run: String,
},
NotReady {
condition: String,
detail: String,
},
SecretMissing {
name: String,
},
Project {
dir: PathBuf,
reason: String,
},
Input {
name: String,
reason: String,
},
MachineUnknown {
run: String,
machine: String,
},
MachineAmbiguous {
run: String,
which: &'static str,
machines: String,
},
NetworkUnknown {
run: String,
network: String,
},
Elevation {
reason: String,
},
Provider {
provider: String,
reason: String,
need: Option<ProviderNeed>,
},
NoProvider {
providers: String,
},
Adopt {
run: String,
reason: String,
},
RunName {
value: String,
},
NoConsole {
machine: String,
why: String,
},
ServerAuthFailed {
step: String,
server: Option<String>,
reason: String,
},
Corrupt {
path: PathBuf,
what: &'static str,
source: Error,
},
Store {
action: &'static str,
code: ErrorCode,
reason: String,
},
IllegalTransition(IllegalTransition),
StateConflict {
run: String,
expected: RunState,
found: Option<RunState>,
},
LeaseHeld {
scope: String,
pid: u32,
},
}Expand description
Why an operation of the runner failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported
The manifest needs something this runner doesn’t do, or the call asks the run for something its target can’t do.
Fields
Declined
The run’s format doesn’t do the operation asked (Terraform parks, resumes and provisions
nothing; Compose provisions nothing): refused before anything acts on the run. Its code is
unsupported.
Io
A file or folder couldn’t be read or written, or a loopback port bound.
Fields
Locked
Another process holds the run’s lock.
ToolMissing
A step’s tool isn’t on PATH.
ToolTooOld
A tool answers at a version older than the manifest’s min_version for it.
Fields
ToolFailed
A step’s tool ran and failed.
Fields
ToolUnanswered
A tool the run needs is installed, but its service didn’t answer: a container engine
stopped, or quit while a step ran. Said by its code, so a caller never reads it out of a
Error::ToolFailed’s wording.
Fields
ToolDenied
A tool refused this account: Docker’s engine its socket or named pipe.
Fields
CredentialsExpired
A cloud refused the sign-in the run’s tools use: it ran out, or was never made.
Fields
AddressPoolOverlap
A network the run makes needs an address block another network holds.
Timeout
A step ran out of time: it showed no progress for its limit, or it ran to the ceiling.
DownloadStalled
A download (what a step downloads in its own phase before it runs, or a step the manifest
marks a download) showed no progress for after_s seconds, and was stopped. A download
has no other limit: one still moving runs as long as it moves.
Fields
what: DownloadKindWhat it downloads.
DownloadFailed
A download couldn’t be made.
Fields
what: DownloadKindWhat it downloads.
AlreadyRunning
The run is already up.
RunningElsewhere
The run is recorded somewhere else.
Fields
PortInUse
A host port the run publishes is taken.
Fields
holder: Option<PortHolder>The process listening on it, when the runner found it (looked up once the operation failed, best-effort).
NotParkable
No park steps for that mode.
NothingToResume
Nothing left to resume.
PartlyGone
Some of the run’s machines are gone (removed outside the runner): a resume brings back only what was kept, so it can’t bring the run back as it was.
NotRunning
The run isn’t up.
NotReady
A ready condition didn’t hold.
SecretMissing
A required secret or input has no value.
Project
A folder that isn’t a project Isothrum runs.
Input
A value or secret that can’t be handed to the tools (its name empty or holding =, a NUL
in it).
MachineUnknown
A machine the run doesn’t have (to provision, console into, attach, detach or retire).
MachineAmbiguous
The run has several machines the call could mean, and it named none.
Fields
NetworkUnknown
A network the run doesn’t have.
Elevation
The elevation the run’s commands need couldn’t be had.
Provider
The run’s Vagrant provider can’t run it.
Fields
need: Option<ProviderNeed>What this computer lacks for it, when that is what refused it.
NoProvider
A Vagrant run was asked for with no provider.
Adopt
A deployment that can’t be taken over as a run.
RunName
A run name that can’t name a run.
NoConsole
A machine with no graphical console to reach, and why.
ServerAuthFailed
The server the run is on refused the run’s credentials (a 401 or 403 from its API, its tool’s failed sign-in): an API token revoked, a password changed.
Fields
Corrupt
A file of the runner’s own is there but isn’t what it wrote (not JSON, or another version’s shape): told apart from a file that can’t be read, which is the OS’s to explain.
Fields
Store
The home’s store couldn’t do what was asked.
Fields
IllegalTransition(IllegalTransition)
The run’s state machine refused the move.
StateConflict
The run moved between the read and the write that would have moved it.
Fields
LeaseHeld
A live process holds the lease asked for.
Implementations§
Source§impl Error
impl Error
Sourcepub fn detail(&self) -> Option<ErrorDetail>
pub fn detail(&self) -> Option<ErrorDetail>
The failure’s typed fields, for one that has any beyond its code and message.
Source§impl Error
impl Error
Sourcepub fn report(&self) -> ErrorReport
pub fn report(&self) -> ErrorReport
The failure as an embedder reads it: Error::code, its message, its step,
Error::detail, and whether the run may have changed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()