#[non_exhaustive]pub enum Error {
Llm {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Validation {
field: Option<String>,
message: String,
},
Io(Error),
Serialization(Error),
Timeout {
seconds: u64,
},
MaxRevisionsExceeded {
attempts: u32,
},
Database(Error),
Config {
message: String,
},
WorkflowNotFound {
id: String,
},
StepNotFound {
id: String,
},
}Expand description
Errors that can occur during ECL workflow execution.
All error variants are marked with #[non_exhaustive] to allow
adding new error types without breaking changes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Llm
LLM provider error (Claude API failures, rate limits, etc.)
Fields
Validation
Step validation error
Io(Error)
I/O error (file operations, network, etc.)
Serialization(Error)
JSON serialization/deserialization error
Timeout
Step execution timeout
MaxRevisionsExceeded
Maximum revision iterations exceeded
Database(Error)
Database error
Config
Configuration error
WorkflowNotFound
Workflow not found
StepNotFound
Step not found
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns whether this error is retryable.
Retryable errors include transient failures like rate limits, network timeouts, and temporary service unavailability.
Sourcepub fn llm_with_source<S, E>(message: S, source: E) -> Error
pub fn llm_with_source<S, E>(message: S, source: E) -> Error
Creates a new LLM error with a message and source error.
Sourcepub fn validation<S>(message: S) -> Error
pub fn validation<S>(message: S) -> Error
Creates a new validation error.
Sourcepub fn validation_field<F, M>(field: F, message: M) -> Error
pub fn validation_field<F, M>(field: F, message: M) -> Error
Creates a new validation error with a field name.
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.