use thiserror::Error;
#[derive(Error, Debug)]
pub enum ActionsError {
#[error("Failed to load environment: `{0}`")]
FailedLoading(String),
#[error("Failed to get input value: `{0}`")]
InputError(String),
#[error("Input Type Error: `{0}` (Expected: `{1}`)")]
InputTypeError(String, String),
#[error("{0}")]
IoError(#[from] std::io::Error),
#[cfg(feature = "toolcache")]
#[error("Tool Cache Error: `{0}`")]
ToolCacheError(String),
#[cfg(feature = "toolcache")]
#[error("Tool Not Found in Cache: `{0}`")]
ToolNotFound(String),
#[cfg(feature = "toolcache")]
#[error("Glob Pattern Error")]
PatternError(#[from] glob::PatternError),
#[cfg(feature = "octocrab")]
#[error("Octocrab Error: `{0}`")]
OctocrabError(String),
#[error("Download Error: `{0}`")]
DownloadError(String),
#[cfg(feature = "toolcache")]
#[error("HTTP Header Error: `{0}`")]
HeaderError(#[from] http::header::InvalidHeaderValue),
#[cfg(feature = "toolcache")]
#[error("HTTP Error: `{0}`")]
ReqwestError(#[from] reqwest::Error),
#[cfg(feature = "toolcache-zip")]
#[error("Zip Error: `{0}`")]
ZipError(#[from] zip::result::ZipError),
#[error("Unable to parse repo reference: `{0}`")]
RepositoryReferenceError(String),
#[error("IO Error: `{0}`")]
IOError(String),
#[error("Not Implemented")]
NotImplemented,
}