#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("API error (status {status}): {message}")]
Api { status: u16, message: String },
#[error("auth mismatch: {0}")]
AuthMismatch(String),
#[error("service is idle; retry the query with wake_service to wake it")]
ServiceIdle,
#[error("service is stopped; it must be started before it can be queried")]
ServiceStopped,
}