use thiserror::Error;

/// Errors that can occur in stream consumer operations.
#[derive(Debug, Error)]
pub enum StreamError {
    #[error("Redis error: {0}")]
    Redis(#[from] redis::RedisError),

    #[error("Redis pool error: {0}")]
    Pool(#[from] deadpool_redis::PoolError),
}

pub type StreamResult<T> = Result<T, StreamError>;
