pub enum ProviderError {
OpenAI(OpenAIError),
Anthropic(AnthropicError),
Gemini(GeminiError),
Azure(AzureOpenAIError),
Cohere(CohereError),
Ollama(OllamaError),
Assistant(AssistantError),
Responses(ResponsesError),
}Expand description
Unified error type that aggregates all LLM provider errors.
This allows using ? across provider boundaries without manually
mapping error types. Each variant wraps the original provider
error, preserving full context.
Variants§
OpenAI(OpenAIError)
OpenAI API error.
Anthropic(AnthropicError)
Anthropic API error.
Gemini(GeminiError)
Gemini API error.
Azure(AzureOpenAIError)
Azure OpenAI API error.
Cohere(CohereError)
Cohere API error.
Ollama(OllamaError)
Ollama API error.
Assistant(AssistantError)
OpenAI Assistants API error.
Responses(ResponsesError)
OpenAI Responses API error.
Trait Implementations§
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AnthropicError> for ProviderError
impl From<AnthropicError> for ProviderError
Source§fn from(e: AnthropicError) -> Self
fn from(e: AnthropicError) -> Self
Converts to this type from the input type.
Source§impl From<AssistantError> for ProviderError
impl From<AssistantError> for ProviderError
Source§fn from(e: AssistantError) -> Self
fn from(e: AssistantError) -> Self
Converts to this type from the input type.
Source§impl From<AzureOpenAIError> for ProviderError
impl From<AzureOpenAIError> for ProviderError
Source§fn from(e: AzureOpenAIError) -> Self
fn from(e: AzureOpenAIError) -> Self
Converts to this type from the input type.
Source§impl From<CohereError> for ProviderError
impl From<CohereError> for ProviderError
Source§fn from(e: CohereError) -> Self
fn from(e: CohereError) -> Self
Converts to this type from the input type.
Source§impl From<GeminiError> for ProviderError
impl From<GeminiError> for ProviderError
Source§fn from(e: GeminiError) -> Self
fn from(e: GeminiError) -> Self
Converts to this type from the input type.
Source§impl From<OllamaError> for ProviderError
impl From<OllamaError> for ProviderError
Source§fn from(e: OllamaError) -> Self
fn from(e: OllamaError) -> Self
Converts to this type from the input type.
Source§impl From<OpenAIError> for ProviderError
impl From<OpenAIError> for ProviderError
Source§fn from(e: OpenAIError) -> Self
fn from(e: OpenAIError) -> Self
Converts to this type from the input type.
Source§impl From<ProviderError> for LcelError
Allow ProviderError to convert into LcelError for LCEL pipeline compatibility.
This enables LLM providers to participate in pipe() chains.
impl From<ProviderError> for LcelError
Allow ProviderError to convert into LcelError for LCEL pipeline compatibility.
This enables LLM providers to participate in pipe() chains.
Source§fn from(err: ProviderError) -> Self
fn from(err: ProviderError) -> Self
Converts to this type from the input type.
Source§impl From<ResponsesError> for ProviderError
impl From<ResponsesError> for ProviderError
Source§fn from(e: ResponsesError) -> Self
fn from(e: ResponsesError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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