Skip to main content

coven_core/sync/store/device_join/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum DeviceJoinError {
3    #[error("device join signature is invalid")]
4    InvalidSignature,
5    #[error("device join offer does not name one active Store/member/provider authority")]
6    OfferMismatch,
7    #[error(
8        "device provider admission approval differs from its request or activated access grant"
9    )]
10    ApprovalMismatch,
11    #[error("device registration request differs from its offer, approval, or reserved slots")]
12    RegistrationRequestMismatch,
13    #[error("device join attempt differs from its signed exchange")]
14    AttemptMismatch,
15    #[error("device join cleanup does not contain the unconditional canonical slot set")]
16    CleanupMismatch,
17    #[error("device join journal transition is not the declared adjacent transition")]
18    NonAdjacentJournalTransition,
19    #[error("device join journal has a different durable value for this role and attempt")]
20    JournalConflict,
21    #[error("pending join payload hash differs from the exact transferred payload")]
22    PendingTransferHashMismatch,
23    #[error("device join reserved slots are not pairwise distinct")]
24    DuplicateReservedSlot,
25    #[error("device join requires an existing Member identity")]
26    MemberNotEligible,
27    #[error("provider operation failed: {0}")]
28    Provider(String),
29    #[error("Store device join state: {0}")]
30    Store(String),
31    #[error("device join requires an activated local Store device")]
32    ActiveDeviceRequired,
33    #[error("device join requires the active local Owner authority")]
34    OwnerAuthorityRequired,
35    #[error("device join requires the selected effective provider administrator")]
36    ProviderAdministratorRequired,
37    #[error("device join requires resolved Store membership")]
38    MembershipConflict,
39    #[error("device join requires the provider's exact-slot adapter")]
40    ExactSlotStorageRequired,
41    #[error("device join attempt cut does not include its provider-access activation")]
42    ApprovalActivationMissing,
43    #[error("device join activation is not materialized in the installed Store database")]
44    ActivationNotMaterialized,
45    #[error(transparent)]
46    Object(#[from] crate::sync::store_objects::StoreObjectError),
47    #[error(transparent)]
48    Registration(#[from] crate::sync::store::StoreRegistrationError),
49    #[error(transparent)]
50    Pull(#[from] crate::sync::store::pull::StorePullError),
51    #[error(transparent)]
52    Outbound(#[from] crate::sync::store::StoreError),
53    #[error(transparent)]
54    Protocol(#[from] crate::sync::store_commit::StoreProtocolError),
55    #[error(transparent)]
56    Storage(#[from] crate::sync::storage::StorageError),
57    #[error(transparent)]
58    Database(#[from] rusqlite::Error),
59    #[error(transparent)]
60    Serialization(#[from] serde_json::Error),
61}