1use zoe_wire_protocol::MessageError;
2
3use crate::SessionManagerError;
4
5#[derive(thiserror::Error, Debug)]
6pub enum ClientError {
7 #[error("Generic error: {0}")]
8 Generic(String),
9 #[error("Build error: {0}")]
10 BuildError(String),
11 #[error("TLS error: {0}")]
12 Tls(#[from] rustls::Error),
13 #[error("Quinn connect error: {0}")]
14 QuinnConnect(#[from] quinn::ConnectError),
15 #[error("Quinn connection error: {0}")]
16 QuinnConnection(#[from] quinn::ConnectionError),
17 #[error("IO error: {0}")]
18 Io(#[from] std::io::Error),
19 #[error("Crypto error: {0}")]
20 Crypto(#[from] zoe_wire_protocol::CryptoError),
21 #[error("Address parse error: {0}")]
22 AddrParse(#[from] std::net::AddrParseError),
23 #[error("File storage error: {0}")]
24 FileStorage(String),
25 #[error("Encryption error: {0}")]
26 Encryption(#[from] zoe_encrypted_storage::ConvergentEncryptionError),
27 #[error("Blob store error: {0}")]
28 BlobStore(#[from] zoe_blob_store::BlobStoreError),
29 #[error("Challenge error: {0}")]
30 Challenge(#[from] anyhow::Error),
31 #[error("Protocol error: {0}")]
32 ProtocolError(String),
33 #[error("Message Rpc error: {0}")]
34 Message(#[from] MessageError),
35 #[error("RPC error: {0}")]
36 RpcError(#[from] tarpc::client::RpcError),
37 #[error("Session manager error: {0}")]
38 SessionManager(#[from] SessionManagerError),
39 #[error("Storage error: {0}")]
40 Storage(#[from] zoe_client_storage::StorageError),
41}
42
43pub type Result<T> = std::result::Result<T, ClientError>;