use thiserror::Error;
#[derive(Debug, Error)]
pub enum LcuError {
#[error("League Client is not running")]
NotRunning,
#[error("authentication timed out")]
AuthTimeout,
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("HTTP status {code}: {body}")]
Status {
code: u16,
body: String,
},
#[error("WebSocket error: {0}")]
WebSocket(#[from] tokio_tungstenite::tungstenite::Error),
#[error("TLS error: {0}")]
Tls(#[from] native_tls::Error),
#[error("invalid header value: {0}")]
InvalidHeader(String),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("lockfile parse error: {0}")]
LockfileParse(String),
}