pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Transport error: {0}")]
Transport(String),
#[error("Encryption error: {0}")]
Encryption(String),
#[error("Decryption error: {0}")]
Decryption(String),
#[error("Request timed out")]
Timeout,
#[error("Validation error: {0}")]
Validation(String),
#[error("Unauthorized: {0}")]
Unauthorized(String),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("{0}")]
Other(String),
}