pub enum ApiErrorType {
ApiError,
OverloadedError,
InvalidRequestError,
AuthenticationError,
RateLimitError,
Unknown(String),
}Expand description
Known Anthropic API error types.
Maps to the type field inside an error response from the Anthropic API.
Variants§
ApiError
Internal server error (HTTP 500)
OverloadedError
Service overloaded (HTTP 529)
InvalidRequestError
Bad request (HTTP 400)
AuthenticationError
Invalid API key (HTTP 401)
RateLimitError
Too many requests (HTTP 429)
Unknown(String)
An error type not yet known to this version of the crate.
Implementations§
Trait Implementations§
Source§impl Clone for ApiErrorType
impl Clone for ApiErrorType
Source§fn clone(&self) -> ApiErrorType
fn clone(&self) -> ApiErrorType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiErrorType
impl Debug for ApiErrorType
Source§impl<'de> Deserialize<'de> for ApiErrorType
impl<'de> Deserialize<'de> for ApiErrorType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ApiErrorType
impl Display for ApiErrorType
Source§impl From<&str> for ApiErrorType
impl From<&str> for ApiErrorType
Source§impl Hash for ApiErrorType
impl Hash for ApiErrorType
Source§impl PartialEq for ApiErrorType
impl PartialEq for ApiErrorType
Source§impl Serialize for ApiErrorType
impl Serialize for ApiErrorType
impl Eq for ApiErrorType
impl StructuralPartialEq for ApiErrorType
Auto Trait Implementations§
impl Freeze for ApiErrorType
impl RefUnwindSafe for ApiErrorType
impl Send for ApiErrorType
impl Sync for ApiErrorType
impl Unpin for ApiErrorType
impl UnsafeUnpin for ApiErrorType
impl UnwindSafe for ApiErrorType
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