pub enum AcceptInviteLinkError {
Show 22 variants
Invite(InviteKeyBundleError),
Api(ApiError),
Crypto(CryptoError),
MissingField(MissingFieldError),
ParseFailure(&'static str),
RecoveryKeyMismatch,
LinkNotFound,
InviteLinkNotAvailable,
InviteLinkConfirmationNotSupported,
EmailNotVerified,
EmailDomainNotAllowed,
ProviderUsersCannotJoin,
OrganizationAccessRevoked,
AlreadyOrganizationMember,
OrganizationHasNoAvailableSeats,
SeatAddFailed,
ResetPasswordKeyRequired,
MemberOfAnotherOrganization,
SingleOrganizationPolicy,
TwoFactorRequiredForMembership,
OnlyOneFreeOrganizationAdminAllowed,
Unknown(String),
}Expand description
Errors returned from crate::InviteLinkUserClient::accept_and_optionally_confirm.
Variants§
Invite(InviteKeyBundleError)
A cryptographic invite operation (unsealing the invite key or organization key) failed.
Api(ApiError)
A network request to the server failed.
Crypto(CryptoError)
A low-level cryptographic operation (key encapsulation, encryption, or public-key parsing) failed.
MissingField(MissingFieldError)
A required field was missing from a server response.
ParseFailure(&'static str)
A value was present but malformed and could not be parsed.
RecoveryKeyMismatch
The account-recovery public key returned by the server does not match the organization public key bound into the invite.
LinkNotFound
The invite link does not exist, its code does not match, or the organization is disabled.
InviteLinkNotAvailable
The organization’s plan does not support invite links.
InviteLinkConfirmationNotSupported
The invite link does not support self-confirmation.
EmailNotVerified
The user must verify their email address before joining the organization.
EmailDomainNotAllowed
The user’s email domain is not in the invite link’s allowed domains.
ProviderUsersCannotJoin
Provider users cannot join organizations via invite links.
OrganizationAccessRevoked
The user’s access to the organization has been revoked.
AlreadyOrganizationMember
The user is already a confirmed member of the organization.
OrganizationHasNoAvailableSeats
The organization has no available seats.
SeatAddFailed
The server was unable to add a seat for the user.
ResetPasswordKeyRequired
The organization requires account recovery enrollment, but no reset password key was sent.
MemberOfAnotherOrganization
The organization’s Single Organization policy requires the user to leave all other organizations first.
SingleOrganizationPolicy
The user belongs to another organization whose Single Organization policy forbids joining.
TwoFactorRequiredForMembership
The organization requires two-step login, which the user has not enabled.
OnlyOneFreeOrganizationAdminAllowed
The user is already an admin of a free organization.
Unknown(String)
The server returned a validation error code this SDK version does not recognize. Carries the server’s human-readable English description of the error, suitable for display; the unrecognized code itself is logged.
Implementations§
Source§impl AcceptInviteLinkError
impl AcceptInviteLinkError
Sourcepub(crate) fn from_api_error(error: ApiError) -> Self
pub(crate) fn from_api_error(error: ApiError) -> Self
Maps an error from an invite link endpoint (fetching the invite, accepting, or confirming)
onto an AcceptInviteLinkError.
A 400 ValidationProblem maps to the variant matching its error code. Responses in the
legacy error format carry no code and are left as AcceptInviteLinkError::Api so existing
clients that inspect the raw response keep working. A 404 always maps to
AcceptInviteLinkError::LinkNotFound, regardless of body shape.
Only use this for those endpoints: a 404 is interpreted as the invite link not existing.
fn from_validation_error(error: ValidationError) -> Self
Trait Implementations§
Source§impl Debug for AcceptInviteLinkError
impl Debug for AcceptInviteLinkError
Source§impl Display for AcceptInviteLinkError
impl Display for AcceptInviteLinkError
Source§impl Error for AcceptInviteLinkError
impl Error for AcceptInviteLinkError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl FlatError for AcceptInviteLinkError
impl FlatError for AcceptInviteLinkError
fn error_variant(&self) -> &'static str
Source§impl From<AcceptInviteLinkError> for JsValue
impl From<AcceptInviteLinkError> for JsValue
Source§fn from(error: AcceptInviteLinkError) -> Self
fn from(error: AcceptInviteLinkError) -> Self
Source§impl From<ApiError> for AcceptInviteLinkError
impl From<ApiError> for AcceptInviteLinkError
Source§impl From<CryptoError> for AcceptInviteLinkError
impl From<CryptoError> for AcceptInviteLinkError
Source§impl From<InviteKeyBundleError> for AcceptInviteLinkError
impl From<InviteKeyBundleError> for AcceptInviteLinkError
Auto Trait Implementations§
impl !RefUnwindSafe for AcceptInviteLinkError
impl !UnwindSafe for AcceptInviteLinkError
impl Freeze for AcceptInviteLinkError
impl Send for AcceptInviteLinkError
impl Sync for AcceptInviteLinkError
impl Unpin for AcceptInviteLinkError
impl UnsafeUnpin for AcceptInviteLinkError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more