use super::ipc::IpcError;
use sn_client::Error as ClientError;
use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error)]
#[allow(clippy::large_enum_variant)]
#[non_exhaustive]
pub enum Error {
#[error("AuthError: {0}")]
AuthError(String),
#[error("AuthIpcError: {0}")]
AuthIpcError(#[from] IpcError),
#[error("AuthdClientError: {0}")]
AuthdClientError(String),
#[error("AuthdError: {0}")]
AuthdError(String),
#[error("AuthdAlreadyStarted: {0}")]
AuthdAlreadyStarted(String),
#[error("AuthenticatorError: {0}")]
AuthenticatorError(String),
#[error("ConnectionError: {0}")]
ConnectionError(String),
#[error("NetDataError: {0}")]
NetDataError(String),
#[error("ContentNotFound: {0}")]
ContentNotFound(String),
#[error("ContentError: {0}")]
ContentError(String),
#[error("ClientError: {0}")]
ClientError(#[from] ClientError),
#[error("EmptyContent: {0}")]
EmptyContent(String),
#[error("AccessDenied: {0}")]
AccessDenied(String),
#[error("VersionNotFound: {0}")]
VersionNotFound(String),
#[error("EntryNotFound: {0}")]
EntryNotFound(String),
#[error("EntryExists: {0}")]
EntryExists(String),
#[error("InvalidAmount: {0}")]
InvalidAmount(String),
#[error("InvalidXorUrl: {0}")]
InvalidXorUrl(String),
#[error("InvalidInput: {0}")]
InvalidInput(String),
#[error("InvalidMediaType: {0}")]
InvalidMediaType(String),
#[error("NotEnoughBalance: {0}")]
NotEnoughBalance(String),
#[error("Serialisation: {0}")]
Serialisation(String),
#[error("FileSystemError: {0}")]
FileSystemError(String),
}