use thiserror::Error;
#[derive(Error, Debug)]
pub enum JiraQueryError {
#[error("Required issues are missing in the Jira response: {}.", .0.join(", "))]
MissingIssues(Vec<String>),
#[error("The Jira query returned no issues.")]
NoIssues,
#[error("Error in accessing the Jira REST API.")]
Request(#[from] reqwest::Error),
#[error("Authentication failed (HTTP {}): {}. Please check your JIRA_API_KEY and JIRA_USER_EMAIL environment variables and that the token specified in JIRA_API_KEY is owned by the account specified in JIRA_USER_EMAIL.", status, message)]
AuthenticationFailed { status: u16, message: String },
}