use thiserror::Error;
#[derive(Debug, Error)]
pub enum HyperError {
#[error("package manifest section not found")]
ManifestNotFound,
#[error("invalid manifest: {0}")]
InvalidManifest(String),
#[error("binary hash mismatch: package integrity check failed")]
BinaryHashMismatch,
#[error("signature verification failed: {0}")]
SignatureVerificationFailed(String),
#[error("untrusted manufacturer: {0}")]
UntrustedManufacturer(String),
#[error("AIS bootstrap failed: {0}")]
AisBootstrapFailed(String),
#[error("storage error: {0}")]
Storage(String),
#[error("config error: {0}")]
Config(String),
#[error("namespace template variable `{0}` not available")]
TemplateVariable(String),
#[error("runtime error: {0}")]
Runtime(String),
#[error(transparent)]
Other(#[from] anyhow::Error),
}
pub(crate) type HyperResult<T> = Result<T, HyperError>;