pub enum ApiKeyError {
Show 19 variants
InvalidMetadataType,
RefillAmountAndIntervalRequired,
RefillIntervalAndAmountRequired,
UnauthorizedSession,
KeyNotFound,
KeyDisabled,
KeyExpired,
UsageExceeded,
ExpiresInIsTooSmall,
ExpiresInIsTooLarge,
InvalidPrefixLength,
InvalidNameLength,
MetadataDisabled,
RateLimited,
NoValuesToUpdate,
InvalidApiKey,
ServerOnlyProperty,
FailedToUpdateApiKey,
NameRequired,
}Expand description
Why an API key request failed. Codes, messages and statuses match Better Auth’s
apiKey plugin.
Variants§
InvalidMetadataType
RefillAmountAndIntervalRequired
RefillIntervalAndAmountRequired
KeyNotFound
Also what verification answers when the key lacks a requested permission.
KeyDisabled
KeyExpired
UsageExceeded
ExpiresInIsTooSmall
ExpiresInIsTooLarge
InvalidPrefixLength
InvalidNameLength
MetadataDisabled
RateLimited
The per-key rate limit. Verification adds details.tryAgainIn in milliseconds.
NoValuesToUpdate
InvalidApiKey
ServerOnlyProperty
FailedToUpdateApiKey
NameRequired
Trait Implementations§
Source§impl Clone for ApiKeyError
impl Clone for ApiKeyError
impl Copy for ApiKeyError
Source§impl Debug for ApiKeyError
impl Debug for ApiKeyError
impl Eq for ApiKeyError
Source§impl ErrorCodes for ApiKeyError
impl ErrorCodes for ApiKeyError
Source§impl From<ApiKeyError> for AuthError
impl From<ApiKeyError> for AuthError
Source§fn from(error: ApiKeyError) -> Self
fn from(error: ApiKeyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ApiKeyError
impl PartialEq for ApiKeyError
impl StructuralPartialEq for ApiKeyError
Auto Trait Implementations§
impl Forget for ApiKeyError
impl Freeze for ApiKeyError
impl Move for ApiKeyError
impl RefUnwindSafe for ApiKeyError
impl Send for ApiKeyError
impl Sync for ApiKeyError
impl Unpin for ApiKeyError
impl UnsafeUnpin for ApiKeyError
impl UnwindSafe for ApiKeyError
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