#[derive(Clone, Debug, thiserror::Error)]
pub enum ClientError {
#[error("no target nodes configured")]
NoTargets,
#[error("no leader available after {attempts} attempt(s)")]
NoLeader {
attempts: u32,
},
#[error("all {attempts} attempt(s) failed; last transport error: {last}")]
Unreachable {
attempts: u32,
last: String,
},
#[error("request timed out after {attempts} attempt(s)")]
Timeout {
attempts: u32,
},
#[error("cluster error: {0}")]
Server(String),
#[error("codec error: {0}")]
Codec(String),
}