pub enum MockError {
Http {
status: Option<StatusCode>,
message: String,
retryable: bool,
},
Auth(String),
InvalidRequest(String),
Provider {
code: String,
message: String,
retryable: bool,
},
Timeout {
elapsed_ms: u64,
},
ResponseFormat {
message: String,
raw: String,
},
SchemaValidation {
message: String,
schema: Value,
actual: Value,
},
RetryExhausted {
attempts: u32,
last_error_message: String,
},
}Expand description
Cloneable error subset for mock queuing.
LlmError contains Box<dyn Error> and is not Clone, so it
can’t be queued directly. This type mirrors the common error
variants. Use queue_error to enqueue
one — it is converted to LlmError when dequeued.
Variants§
Http
Maps to LlmError::Http.
Fields
§
status: Option<StatusCode>HTTP status code, if any.
Auth(String)
Maps to LlmError::Auth.
InvalidRequest(String)
Maps to LlmError::InvalidRequest.
Provider
Maps to LlmError::Provider.
Fields
Timeout
Maps to LlmError::Timeout.
ResponseFormat
Maps to LlmError::ResponseFormat.
SchemaValidation
Maps to LlmError::SchemaValidation.
Fields
RetryExhausted
Maps to LlmError::RetryExhausted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockError
impl RefUnwindSafe for MockError
impl Send for MockError
impl Sync for MockError
impl Unpin for MockError
impl UnwindSafe for MockError
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
Mutably borrows from an owned value. Read more