//! Error types for photon-etcd-cluster.

/// Errors that can occur during cluster operations.
#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum ClusterError {
    /// Error from the etcd client.
    #[error("etcd error: {0}")]
    Etcd(#[from] etcd_client::Error),

    /// Internal error (e.g., serialization, invalid state).
    #[error("internal error: {0}")]
    Internal(String),
}

/// Result type alias for cluster operations.
pub type Result<T> = std::result::Result<T, ClusterError>;
