pub enum AgentErrorReason {
Show 16 variants
LlmRateLimited {
retry_after_ms: Option<u64>,
},
LlmContextExceeded {
max: u32,
requested: u32,
},
LlmAuthError,
LlmInvalidModel {
model: String,
},
LlmProviderError {
provider_error_kind: LlmProviderErrorKind,
provider_error_retryability: LlmProviderErrorRetryability,
provider_error: Value,
},
LlmNetworkTimeout {
duration_ms: u64,
},
LlmCallTimeout {
duration_ms: u64,
},
HookDenied {
hook_id: Option<HookId>,
point: HookPoint,
reason_code: HookReasonCode,
},
HookTimeout {
hook_id: HookId,
timeout_ms: u64,
},
HookExecutionFailed {
hook_id: HookId,
reason: String,
},
HookConfigInvalid {
reason: String,
},
StructuredOutputValidationFailed {
attempts: u32,
reason: String,
},
InvalidOutputSchema {
reason: String,
},
AuthReauthRequired {
binding_key: String,
message: String,
},
CallbackPending {
tool_name: String,
args: Value,
},
TurnTerminalCause {
outcome: TurnTerminalOutcome,
cause_kind: TurnTerminalCauseKind,
},
}Variants§
LlmRateLimited
LlmContextExceeded
LlmAuthError
LlmInvalidModel
LlmProviderError
Fields
§
provider_error_kind: LlmProviderErrorKind§
provider_error_retryability: LlmProviderErrorRetryabilityLlmNetworkTimeout
LlmCallTimeout
HookDenied
HookTimeout
HookExecutionFailed
HookConfigInvalid
StructuredOutputValidationFailed
InvalidOutputSchema
AuthReauthRequired
CallbackPending
TurnTerminalCause
Implementations§
Source§impl AgentErrorReason
impl AgentErrorReason
pub fn from_agent_error(error: &AgentError) -> Option<Self>
Trait Implementations§
Source§impl Clone for AgentErrorReason
impl Clone for AgentErrorReason
Source§fn clone(&self) -> AgentErrorReason
fn clone(&self) -> AgentErrorReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentErrorReason
impl Debug for AgentErrorReason
Source§impl<'de> Deserialize<'de> for AgentErrorReason
impl<'de> Deserialize<'de> for AgentErrorReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for AgentErrorReason
impl JsonSchema for AgentErrorReason
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AgentErrorReason
impl PartialEq for AgentErrorReason
Source§fn eq(&self, other: &AgentErrorReason) -> bool
fn eq(&self, other: &AgentErrorReason) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentErrorReason
impl Serialize for AgentErrorReason
impl Eq for AgentErrorReason
impl StructuralPartialEq for AgentErrorReason
Auto Trait Implementations§
impl Freeze for AgentErrorReason
impl RefUnwindSafe for AgentErrorReason
impl Send for AgentErrorReason
impl Sync for AgentErrorReason
impl Unpin for AgentErrorReason
impl UnsafeUnpin for AgentErrorReason
impl UnwindSafe for AgentErrorReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.