use thiserror::Error;
#[derive(Error, Debug)]
pub enum PingError {
#[error("connection failed: {0}")]
Connection(std::io::Error),
#[error("connection timed out")]
Timeout,
#[error("protocol error: {0}")]
Protocol(String),
#[error("JSON parse error: {0}")]
Json(#[from] serde_json::Error),
#[error("unexpected response: {0}")]
UnexpectedResponse(String),
}