core_crypto/error/leaf.rs
1/// These errors can be raised from several different modules, so we centralize the definitions here
2/// to ease error-handling.
3#[derive(Debug, thiserror::Error)]
4pub enum LeafError {
5 /// This error is emitted when the requested conversation already exists with the given if
6 #[error("Conversation already exists")]
7 ConversationAlreadyExists(crate::prelude::ConversationId),
8 /// This error is emitted when the requested conversation couldn't be found in our store
9 #[error("Couldn't find conversation")]
10 ConversationNotFound(crate::prelude::ConversationId),
11 /// When looking for a X509 credential for a given ciphersuite and it has not been done
12 #[error("End-to-end identity enrollment has not been done")]
13 E2eiEnrollmentNotDone,
14 /// The MLS group is in an invalid state for an unknown reason
15 #[error("The MLS group is in an invalid state for an unknown reason")]
16 InternalMlsError,
17 /// Unexpectedly failed to retrieve group info
18 ///
19 /// This may be an implementation error.
20 #[error("unexpectedly failed to retrieve group info")]
21 MissingGroupInfo,
22}