xmtp_mls/builder/
error.rs1use super::*;
4
5#[derive(Error, Debug, ErrorCode)]
6pub enum ClientBuilderError {
7 #[error(transparent)]
10 #[error_code("StorageLocation")]
11 StorageLocation(#[from] crate::storage_location::StorageLocationError),
12 #[error(transparent)]
15 #[error_code("Attachment")]
16 Attachment(#[from] crate::attachments::AttachmentClientError),
17 #[error(transparent)]
18 #[error_code(inherit)]
19 AddressValidation(#[from] IdentifierValidationError),
20 #[error("Missing parameter: {parameter}")]
24 MissingParameter { parameter: &'static str },
25 #[error(transparent)]
29 ClientError(#[from] crate::client::ClientError),
30 #[error("Storage Error")]
34 StorageError(#[from] StorageError),
35 #[error(transparent)]
39 Identity(#[from] crate::identity::IdentityError),
40 #[error(transparent)]
44 WrappedApiError(#[from] xmtp_api::ApiError),
45 #[error(transparent)]
49 GroupError(#[from] Box<crate::groups::GroupError>),
50 #[error(transparent)]
54 DeviceSync(#[from] Box<crate::worker::device_sync::DeviceSyncError>),
55 #[error("Offline build failed, builder tried to access the network")]
59 OfflineBuildFailed,
60}
61
62impl From<crate::worker::device_sync::DeviceSyncError> for ClientBuilderError {
63 fn from(value: crate::worker::device_sync::DeviceSyncError) -> Self {
64 ClientBuilderError::DeviceSync(Box::new(value))
65 }
66}
67
68impl From<crate::groups::GroupError> for ClientBuilderError {
69 fn from(value: crate::groups::GroupError) -> Self {
70 ClientBuilderError::GroupError(Box::new(value))
71 }
72}