agent_storage/family_invitation/
invitation_storage_error.rs1use crate::FamilyId;
4use thiserror::Error;
5
6#[derive(Debug, Error, Clone, PartialEq, Eq)]
7pub enum InvitationStorageError {
8 #[error("family not found: {0}")]
9 FamilyNotFound(FamilyId),
10 #[error("invitation not found")]
11 NotFound,
12 #[error("invitation has expired")]
13 Expired,
14 #[error("invitation has been revoked")]
15 Revoked,
16 #[error("invitation has already been accepted")]
17 AlreadyAccepted,
18 #[error("invitation target identity does not match the accepting identity")]
19 IdentityMismatch,
20 #[error("invitation expiry must be in the future")]
21 InvalidExpiry,
22 #[error("target identity provider and subject must not be empty")]
23 EmptyTargetIdentity,
24 #[error("inviter is not a member of the family")]
25 InviterNotMember,
26 #[error("membership already exists; invitation cannot create a duplicate membership")]
27 MembershipAlreadyExists,
28 #[error("membership creation failed")]
29 MembershipCreationFailed,
30 #[error("invitation storage backend failed: {0}")]
31 Backend(String),
32}