#[non_exhaustive]pub enum ErrorCode {
Show 13 variants
InvalidRequest,
Unauthorized,
InsufficientCredits,
EmailVerificationRequired,
Forbidden,
NotFound,
Conflict,
AccountDeletionPending,
ValidationFailed,
RateLimited,
InternalError,
ServiceUnavailable,
Unknown(String),
}Expand description
Stable API error code. Unknown codes decode to
ErrorCode::Unknown with the raw string preserved.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidRequest
invalid_request (HTTP 400)
unauthorized (HTTP 401)
InsufficientCredits
insufficient_credits (HTTP 402)
EmailVerificationRequired
email_verification_required (HTTP 402)
Forbidden
forbidden (HTTP 403)
NotFound
not_found (HTTP 404)
Conflict
conflict (HTTP 409)
AccountDeletionPending
account_deletion_pending (HTTP 409)
ValidationFailed
validation_failed (HTTP 422)
RateLimited
rate_limited (HTTP 429)
InternalError
internal_error (HTTP 500)
service_unavailable (HTTP 502)
Unknown(String)
Any code not known to this SDK version. The raw string is preserved.
Implementations§
Trait Implementations§
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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