use thiserror::Error as ThisError;
#[derive(Debug, ThisError)]
pub enum Error {
#[error("HTTP request failed: {0}")]
Request(#[from] reqwest::Error),
#[error("Starflask API error {status}: {body}")]
Api { status: u16, body: String },
#[error("Session failed: {0}")]
SessionFailed(String),
#[error("Session timed out after {0:?}")]
Timeout(std::time::Duration),
#[error("{0}")]
Other(String),
}