#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum BundleError {
#[error("invalid bundle archive: {0}")]
Archive(String),
#[error("invalid bundle manifest: {0}")]
Manifest(String),
#[error("bundle integrity check failed: {0}")]
Integrity(String),
#[error("bundle signature: {0}")]
Signature(String),
#[error("bundle workflow `{name}`: {message}")]
Workflow { name: String, message: String },
#[error("{0}")]
Secret(String),
#[error("bundle build: {0}")]
Build(String),
#[error("bundled plugin `{plugin}`: {message}")]
Plugin { plugin: String, message: String },
#[error("{path}: {message}")]
Io { path: String, message: String },
}
impl BundleError {
pub(crate) fn io(path: &std::path::Path, e: &std::io::Error) -> Self {
Self::Io { path: path.display().to_string(), message: e.to_string() }
}
}