Skip to main content

keri_controller/identifier/mechanics/
mod.rs

1use keri_core::{oobi::error::OobiError, prefix::IdentifierPrefix, transport::TransportError};
2
3use crate::communication::SendingError;
4
5use self::{broadcast::BroadcastingError, query_mailbox::ResponseProcessingError};
6
7pub mod broadcast;
8#[cfg(feature = "query_cache")]
9pub mod cache;
10pub mod delegate;
11pub mod group;
12pub mod kel_managing;
13mod mailbox;
14pub mod notify_witness;
15pub mod query_mailbox;
16pub mod tel_managing;
17pub mod watcher_configuration;
18
19#[derive(Debug, thiserror::Error)]
20pub enum MechanicsError {
21    #[error(transparent)]
22    SendingError(#[from] SendingError),
23
24    #[error("Transport error: {0}")]
25    Transport(#[from] TransportError),
26
27    #[error("Can't lock")]
28    LockingError,
29
30    #[error("transparent")]
31    EventProcessingError(#[from] keri_core::error::Error),
32
33    #[error(transparent)]
34    ResponseProcessingError(#[from] ResponseProcessingError),
35
36    #[error("No kel events for {0} saved")]
37    UnknownIdentifierError(IdentifierPrefix),
38
39    #[error("Can't generate event: {0}")]
40    EventGenerationError(String),
41
42    #[error("Not group participant")]
43    NotGroupParticipantError,
44
45    #[error("Error: {0}")]
46    OtherError(String),
47
48    #[error("Wrong event type")]
49    WrongEventTypeError,
50
51    #[error("Wrong event format")]
52    EventFormatError,
53
54    #[error("Inception event error: {0}")]
55    InceptionError(String),
56
57    #[error("Improper witness prefix, should be basic prefix")]
58    WrongWitnessPrefixError,
59
60    #[error("Oobi error: {0}")]
61    OobiError(#[from] OobiError),
62
63    #[error("Broadcasting error: {0}")]
64    BroadcastingError(#[from] BroadcastingError),
65}