openmls/test_utils/test_framework/
errors.rs1use thiserror::Error;
2
3use crate::{error::LibraryError, group::errors::*};
4use openmls_rust_crypto::MemoryStorage;
5
6#[derive(Error, Debug, PartialEq)]
8pub enum SetupError<StorageError> {
9 #[error("")]
10 UnknownGroupId,
11 #[error("")]
12 UnknownClientId,
13 #[error("")]
14 NotEnoughClients,
15 #[error("")]
16 ClientAlreadyInGroup,
17 #[error("")]
18 ClientNotInGroup,
19 #[error("")]
20 NoFreshKeyPackage,
21 #[error(transparent)]
23 ClientError(#[from] ClientError<StorageError>),
24 #[error(transparent)]
26 ExportSecretError(#[from] ExportSecretError),
27 #[error(transparent)]
29 LibraryError(#[from] LibraryError),
30 #[error("")]
31 Unknown,
32}
33
34#[derive(Debug)]
35pub enum SetupGroupError {
36 NotEnoughMembers,
37}
38
39#[derive(Error, Debug, PartialEq)]
41pub enum ClientError<StorageError> {
42 #[error("")]
43 NoMatchingKeyPackage,
44 #[error("")]
45 NoMatchingCredential,
46 #[error("")]
47 CiphersuiteNotSupported,
48 #[error("")]
49 NoMatchingGroup,
50 #[error("")]
51 NoCiphersuite,
52 #[error(transparent)]
54 FailedToJoinGroup(#[from] WelcomeError<StorageError>),
55 #[error(transparent)]
57 TlsCodecError(tls_codec::Error),
58 #[error("See ProcessMessageError for more details.")]
60 ProcessMessageError(ProcessMessageError<StorageError>),
61 #[error(transparent)]
63 AddMembersError(#[from] AddMembersError<StorageError>),
64 #[error(transparent)]
66 RemoveMembersError(#[from] RemoveMembersError<StorageError>),
67 #[error(transparent)]
69 ProposeAddMemberError(#[from] ProposeAddMemberError<StorageError>),
70 #[error(transparent)]
72 ProposeRemoveMemberError(#[from] ProposeRemoveMemberError<StorageError>),
73 #[error("Error exporting secret")]
75 ExportSecretError(ExportSecretError),
76 #[error(transparent)]
78 NewGroupError(#[from] NewGroupError<StorageError>),
79 #[error(transparent)]
81 SelfUpdateError(#[from] SelfUpdateError<StorageError>),
82 #[error(transparent)]
84 ProposeSelfUpdateError(#[from] ProposeSelfUpdateError<StorageError>),
85 #[error(transparent)]
87 MergePendingCommitError(#[from] MergePendingCommitError<StorageError>),
88 #[error(transparent)]
90 MergeCommitError(#[from] MergeCommitError<StorageError>),
91 #[error(transparent)]
93 KeyStoreError(#[from] StorageError),
94 #[error(transparent)]
96 LibraryError(LibraryError),
97 #[error("")]
98 Unknown,
99}