pub enum ApiErrorKind {
BadRequest,
Authentication,
PermissionDenied,
NotFound,
Conflict,
UnprocessableEntity,
RateLimit,
InternalServer,
Other,
}Expand description
Error class by HTTP status, matching the APIError subclasses in the official SDKs.
Variants§
BadRequest
400 BadRequestError
Authentication
401 AuthenticationError
PermissionDenied
403 PermissionDeniedError
NotFound
404 NotFoundError
Conflict
409 ConflictError
UnprocessableEntity
422 UnprocessableEntityError
RateLimit
429 RateLimitError
InternalServer
= 500
InternalServerError(includes Anthropic’s 529overloaded_error)
Other
Any other non-2xx status (the base APIError)
Implementations§
Source§impl ApiErrorKind
impl ApiErrorKind
pub fn from_status(status: u16) -> Self
Trait Implementations§
Source§impl Clone for ApiErrorKind
impl Clone for ApiErrorKind
impl Copy for ApiErrorKind
Source§impl Debug for ApiErrorKind
impl Debug for ApiErrorKind
impl Eq for ApiErrorKind
Source§impl PartialEq for ApiErrorKind
impl PartialEq for ApiErrorKind
impl StructuralPartialEq for ApiErrorKind
Auto Trait Implementations§
impl Freeze for ApiErrorKind
impl RefUnwindSafe for ApiErrorKind
impl Send for ApiErrorKind
impl Sync for ApiErrorKind
impl Unpin for ApiErrorKind
impl UnsafeUnpin for ApiErrorKind
impl UnwindSafe for ApiErrorKind
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