#[non_exhaustive]pub enum AzureOpenAIError {
Http(String),
Api(String),
Parse(String),
StreamInterrupted(String),
}Expand description
Azure OpenAI error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(String)
HTTP request error.
Api(String)
API error (non-2xx response).
Parse(String)
Response parsing error.
StreamInterrupted(String)
The SSE stream ended before a terminal marker ([DONE], or a chunk
carrying finish_reason) — the connection dropped mid-generation and
the partial output is truncated (A12, mirrors OpenAIError).
Trait Implementations§
Source§impl Debug for AzureOpenAIError
impl Debug for AzureOpenAIError
Source§impl Display for AzureOpenAIError
impl Display for AzureOpenAIError
Source§impl Error for AzureOpenAIError
impl Error for AzureOpenAIError
1.30.0 · 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<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.
Auto Trait Implementations§
impl Freeze for AzureOpenAIError
impl RefUnwindSafe for AzureOpenAIError
impl Send for AzureOpenAIError
impl Sync for AzureOpenAIError
impl Unpin for AzureOpenAIError
impl UnsafeUnpin for AzureOpenAIError
impl UnwindSafe for AzureOpenAIError
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