pub enum GenAiError {
HttpError(String),
JsonError(String),
ApiError {
status: u16,
message: String,
},
InvalidResponse(String),
RateLimitExceeded {
retry_after: Option<u64>,
},
AuthenticationError(String),
}Expand description
Error type for Anthropic API operations
Variants§
HttpError(String)
HTTP request failed
JsonError(String)
Failed to serialize/deserialize JSON
ApiError
API returned an error
InvalidResponse(String)
Unexpected response format
RateLimitExceeded
Rate limit exceeded
AuthenticationError(String)
Authentication error
Trait Implementations§
Source§impl Debug for GenAiError
impl Debug for GenAiError
Source§impl Display for GenAiError
impl Display for GenAiError
Source§impl Error for GenAiError
impl Error for GenAiError
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()
Auto Trait Implementations§
impl Freeze for GenAiError
impl RefUnwindSafe for GenAiError
impl Send for GenAiError
impl Sync for GenAiError
impl Unpin for GenAiError
impl UnwindSafe for GenAiError
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