#[cfg(feature = "trypema")]
use trypema_crate::TrypemaError;
#[cfg(feature = "counter")]
use crate::counter::CounterError;
#[derive(Debug, thiserror::Error, PartialEq)]
pub enum DistkitError {
#[error("Invalid Redis key: {0}")]
InvalidRedisKey(String),
#[cfg(feature = "counter")]
#[error("Counter Error: {0}")]
CounterError(#[from] CounterError),
#[error("Redis Error: {0}")]
RedisError(#[from] redis::RedisError),
#[error("Mutex poisoned: {0}")]
MutexPoisoned(&'static str),
#[error("Custom Error: {0}")]
CustomError(String),
#[cfg(feature = "trypema")]
#[cfg_attr(docsrs, doc(cfg(feature = "trypema")))]
#[error("Trypema Error: {0}")]
TrypemaError(#[from] TrypemaError),
}