pub enum AnthropicError {
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 AnthropicError
impl Debug for AnthropicError
Source§impl Display for AnthropicError
impl Display for AnthropicError
Source§impl Error for AnthropicError
impl Error for AnthropicError
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 AnthropicError
impl RefUnwindSafe for AnthropicError
impl Send for AnthropicError
impl Sync for AnthropicError
impl Unpin for AnthropicError
impl UnwindSafe for AnthropicError
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