pub enum AdminError {
Show 22 variants
YouCannotBanYourself,
YouAreNotAllowedToChangeUsersRole,
YouAreNotAllowedToCreateUsers,
YouAreNotAllowedToListUsers,
YouAreNotAllowedToListUsersSessions,
YouAreNotAllowedToBanUsers,
YouAreNotAllowedToImpersonateUsers,
YouAreNotAllowedToRevokeUsersSessions,
YouAreNotAllowedToDeleteUsers,
YouAreNotAllowedToSetUsersPassword,
BannedUser {
message: String,
},
YouAreNotAllowedToGetUser,
NoDataToUpdate,
YouAreNotAllowedToUpdateUsers,
YouCannotRemoveYourself,
YouAreNotAllowedToSetNonExistentValue,
YouCannotImpersonateAdmins,
InvalidRoleType,
YouAreNotAllowedToSetUsersEmail,
PasswordCannotBeUpdatedViaUpdateUser,
UserIdCannotBeUpdated,
NotImpersonating,
}Expand description
Why an admin request failed. Codes, statuses and messages match Better Auth’s admin
plugin; USER_NOT_FOUND, INVALID_EMAIL and USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL
come from core.
Variants§
YouCannotBanYourself
YouAreNotAllowedToChangeUsersRole
YouAreNotAllowedToCreateUsers
YouAreNotAllowedToListUsers
YouAreNotAllowedToListUsersSessions
YouAreNotAllowedToBanUsers
YouAreNotAllowedToImpersonateUsers
YouAreNotAllowedToRevokeUsersSessions
YouAreNotAllowedToDeleteUsers
YouAreNotAllowedToSetUsersPassword
BannedUser
A banned user tried to sign in. The message is the configured banned-user message plus the ban’s reason.
YouAreNotAllowedToGetUser
NoDataToUpdate
YouAreNotAllowedToUpdateUsers
YouCannotRemoveYourself
YouAreNotAllowedToSetNonExistentValue
YouCannotImpersonateAdmins
InvalidRoleType
YouAreNotAllowedToSetUsersEmail
PasswordCannotBeUpdatedViaUpdateUser
UserIdCannotBeUpdated
NotImpersonating
/admin/stop-impersonating from a session that isn’t impersonating.
Trait Implementations§
Source§impl Clone for AdminError
impl Clone for AdminError
Source§impl Debug for AdminError
impl Debug for AdminError
impl Eq for AdminError
Source§impl ErrorCodes for AdminError
impl ErrorCodes for AdminError
Source§impl From<AdminError> for AuthError
impl From<AdminError> for AuthError
Source§fn from(error: AdminError) -> Self
fn from(error: AdminError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AdminError
impl PartialEq for AdminError
impl StructuralPartialEq for AdminError
Auto Trait Implementations§
impl Forget for AdminError
impl Freeze for AdminError
impl Move for AdminError
impl RefUnwindSafe for AdminError
impl Send for AdminError
impl Sync for AdminError
impl Unpin for AdminError
impl UnsafeUnpin for AdminError
impl UnwindSafe for AdminError
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