use thiserror::Error;
#[derive(Debug, Error)]
pub enum PlayError {
#[error("HTTP request failed: {0}")]
Http(#[from] reqwest::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Server error [{status}]: {body}")]
Response {
status: u16,
body: String,
},
}
pub type PlayResult<T> = Result<T, PlayError>;