Enum clust::ApiErrorType
source · pub enum ApiErrorType {
InvalidRequestError,
AuthenticationError,
PermissionError,
NotFoundError,
RateLimitError,
ApiError,
OverloadedError,
Unknown(StatusCode),
}
Expand description
The API error type defined at the errors.
Variants§
InvalidRequestError
400 - invalid_request_error: There was an issue with the format or content of your request.
AuthenticationError
401 - authentication_error: There’s an issue with your API key.
PermissionError
403 - permission_error: Your API key does not have permission to use the specified resource.
NotFoundError
404 - not_found_error: The requested resource was not found.
RateLimitError
429 - rate_limit_error: Your account has hit a rate limit.
ApiError
500 - api_error: An unexpected error has occurred internal to Anthropic’s systems.
OverloadedError
529 - overloaded_error: Anthropic’s API is temporarily overloaded.
Unknown(StatusCode)
Unknown error type.
Trait Implementations§
source§impl Clone for ApiErrorType
impl Clone for ApiErrorType
source§fn clone(&self) -> ApiErrorType
fn clone(&self) -> ApiErrorType
Returns a copy 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 Display for ApiErrorType
impl Display for ApiErrorType
source§impl From<StatusCode> for ApiErrorType
impl From<StatusCode> for ApiErrorType
source§fn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Converts to this type from the input type.
source§impl PartialEq for ApiErrorType
impl PartialEq for ApiErrorType
source§fn eq(&self, other: &ApiErrorType) -> bool
fn eq(&self, other: &ApiErrorType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)