pub enum ProviderError {
Show 13 variants
OpenAI(OpenAIError),
Anthropic(AnthropicError),
Gemini(GeminiError),
Azure(AzureOpenAIError),
Cohere(CohereError),
Ollama(OllamaError),
Assistant(AssistantError),
Responses(ResponsesError),
DeepSeek(OpenAIError),
Qwen(OpenAIError),
Moonshot(OpenAIError),
Zhipu(OpenAIError),
Mistral(OpenAIError),
}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.
DeepSeek(OpenAIError)
DeepSeek API error (OpenAI-compatible endpoint).
Qwen(OpenAIError)
Qwen (Alibaba) API error (OpenAI-compatible endpoint).
Moonshot(OpenAIError)
Moonshot (Kimi) API error (OpenAI-compatible endpoint).
Zhipu(OpenAIError)
Zhipu (ChatGLM) API error (OpenAI-compatible endpoint).
Mistral(OpenAIError)
Mistral API error (OpenAI-compatible endpoint).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
Source§impl From<AssistantError> for ProviderError
impl From<AssistantError> for ProviderError
Source§fn from(e: AssistantError) -> Self
fn from(e: AssistantError) -> Self
Source§impl From<AzureOpenAIError> for ProviderError
impl From<AzureOpenAIError> for ProviderError
Source§fn from(e: AzureOpenAIError) -> Self
fn from(e: AzureOpenAIError) -> Self
Source§impl From<CohereError> for ProviderError
impl From<CohereError> for ProviderError
Source§fn from(e: CohereError) -> Self
fn from(e: CohereError) -> Self
Source§impl From<GeminiError> for ProviderError
impl From<GeminiError> for ProviderError
Source§fn from(e: GeminiError) -> Self
fn from(e: GeminiError) -> Self
Source§impl From<OllamaError> for ProviderError
impl From<OllamaError> for ProviderError
Source§fn from(e: OllamaError) -> Self
fn from(e: OllamaError) -> Self
Source§impl From<OpenAIError> for ProviderError
impl From<OpenAIError> for ProviderError
Source§fn from(e: OpenAIError) -> Self
fn from(e: OpenAIError) -> Self
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.