#[derive(Debug, thiserror::Error)]
pub enum AzdoError {
#[error("not implemented: {method} is planned for Phase {phase}")]
NotImplemented {
method: String,
phase: u32,
},
#[error("invalid credentials: {0}")]
InvalidCredentials(String),
#[error("invalid URL: {0}")]
InvalidUrl(String),
#[error("HTTP error {status}: {message}")]
Http {
status: u16,
message: String,
},
#[error("authentication failed (401): check PAT and organisation URL")]
Unauthorized,
#[error("access denied (403): PAT lacks required scope")]
Forbidden,
#[error("resource not found (404): check organisation, project, and credentials")]
NotFound,
#[error("request error: {0}")]
Request(#[from] reqwest::Error),
#[error("response parse error: {0}")]
Parse(String),
#[error("invalid Azure DevOps configuration: {0}")]
Config(String),
}