pub enum CliCoreError {
Show 13 variants
MissingAuthProvider(String),
AuthProvider {
provider: String,
source: Box<dyn Error + Send + Sync>,
},
InvalidOutputFormat(String),
Message(String),
SystemMessage {
message: String,
system: String,
code: String,
request_id: String,
},
System {
system: String,
source: Box<dyn Error + Send + Sync>,
},
Detailed {
code: String,
system: String,
request_id: String,
next_actions: Vec<NextAction>,
source: Box<dyn Error + Send + Sync>,
},
ExitCode {
code: i32,
source: Box<dyn Error + Send + Sync>,
},
Fix {
fix: String,
source: Box<dyn Error + Send + Sync>,
},
Io(Error),
Json(Error),
Transport(Error),
EnvConfig(EnvConfigError),
}Expand description
Framework error type.
Variants§
MissingAuthProvider(String)
Requested auth provider has not been registered.
AuthProvider
Auth provider failed.
InvalidOutputFormat(String)
Output format is not supported.
Message(String)
Plain message error.
SystemMessage
Structured message with explicit envelope metadata.
Fields
System
Wrapped source error with backend/system attribution.
Detailed
Wrapped source error with structured metadata captured up front.
Fields
next_actions: Vec<NextAction>Structured follow-up actions captured from the source’s
DetailedError::error_next_actions at wrap time — the source is
erased to Box<dyn Error> immediately below, so this can’t be
recovered later by downcasting.
ExitCode
Wrapped source error with explicit process exit code.
Fix
Wrapped source error with a recovery hint for the output envelope.
Fields
Io(Error)
IO error.
Json(Error)
JSON serialization or decoding error.
Transport(Error)
Structured HTTP transport error.
EnvConfig(EnvConfigError)
An EnvConfig struct failed to
assemble from its SourceChain.
Implementations§
Source§impl CliCoreError
impl CliCoreError
Sourcepub fn message_for_system(
system: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn message_for_system( system: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a structured message attributed to a backend/system id.
Sourcepub fn with_system(
system: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_system( system: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Wraps a source error with backend/system attribution.
Sourcepub fn with_exit_code(
code: i32,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_exit_code( code: i32, source: impl Error + Send + Sync + 'static, ) -> Self
Wraps a source error with an explicit process exit code.
Sourcepub fn with_fix(
fix: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_fix( fix: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Wraps a source error with a recovery hint for the output envelope.
Empty hints do not wrap: a CliCoreError source is returned as-is.
Sourcepub fn with_detailed_error(
source: impl DetailedError + Send + Sync + 'static,
) -> Self
pub fn with_detailed_error( source: impl DetailedError + Send + Sync + 'static, ) -> Self
Captures structured metadata from a detailed source error.
Sourcepub fn is_auth(&self) -> bool
pub fn is_auth(&self) -> bool
Reports whether this error originates from credential resolution.
True for MissingAuthProvider and
AuthProvider, including when those variants are
wrapped by Fix or ExitCode. The engine
uses this to classify a command outcome as auth-error rather than a
generic command error, based on the error a handler actually returns — so
a handler that swallows a resolution failure and then fails for another
reason is not misclassified.
Trait Implementations§
Source§impl Debug for CliCoreError
impl Debug for CliCoreError
Source§impl Display for CliCoreError
impl Display for CliCoreError
Source§impl Error for CliCoreError
impl Error for CliCoreError
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()