use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum GorError {
#[error("HTTP request failed: {0}")]
Http(#[from] reqwest::Error),
#[error("authentication failed: {0}")]
Auth(String),
#[error("not found: {0}")]
NotFound(String),
#[error("rate limit exceeded: {0}")]
RateLimit(String),
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("keyring error: {0}")]
Keyring(String),
#[error("device flow timed out: {0}")]
DeviceTimeout(String),
#[error("device flow authorization declined")]
DeviceDeclined,
}