pub enum OperationError {
Shell {
exit_code: i32,
stderr: String,
},
Agent(AgentError),
Timeout {
step: String,
limit: Duration,
},
Http {
status: Option<u16>,
message: String,
},
Deserialize {
target_type: String,
reason: String,
},
Secret {
message: String,
},
External {
origin: String,
message: String,
},
}Expand description
Top-level error for any workflow operation (shell or agent).
Every public operation in ironflow returns Result<T, OperationError>.
Variants§
Shell
A shell command exited with a non-zero status code.
Fields
stderr: StringCaptured stderr, truncated to MAX_OUTPUT_SIZE.
Agent(AgentError)
An agent invocation failed.
Wraps an AgentError with full detail about the failure.
Timeout
An operation exceeded its configured timeout.
Fields
Http
An HTTP request failed at the transport layer or the response body could not be read.
Fields
Deserialize
Failed to deserialize a JSON response into the expected Rust type.
Returned by AgentResult::json
and HttpOutput::json.
Fields
Secret
The secret store failed to read or decrypt a secret.
Returned by SecretResolver::get
implementations when the underlying storage or decryption layer errors.
External
An error from an external library (e.g. git2, gitlab).
Used by ironflow-ops-* crates to wrap third-party library errors
without introducing domain-specific variants into this enum.
§Examples
use ironflow_core::error::OperationError;
let err = OperationError::External {
origin: "git".to_string(),
message: "reference not found".to_string(),
};
assert!(err.to_string().contains("git error"));Implementations§
Source§impl OperationError
impl OperationError
Sourcepub fn deserialize<T>(error: impl Display) -> Self
pub fn deserialize<T>(error: impl Display) -> Self
Build a Deserialize error for type T.
Trait Implementations§
Source§impl Debug for OperationError
impl Debug for OperationError
Source§impl Display for OperationError
impl Display for OperationError
Source§impl Error for OperationError
impl Error for OperationError
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()