1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum HyperError {
5 #[error("package manifest section not found")]
7 ManifestNotFound,
8
9 #[error("invalid manifest: {0}")]
11 InvalidManifest(String),
12
13 #[error("binary hash mismatch: package integrity check failed")]
15 BinaryHashMismatch,
16
17 #[error("signature verification failed: {0}")]
19 SignatureVerificationFailed(String),
20
21 #[error("untrusted manufacturer: {0}")]
23 UntrustedManufacturer(String),
24
25 #[error("AIS bootstrap failed: {0}")]
27 AisBootstrapFailed(String),
28
29 #[error("storage error: {0}")]
31 Storage(String),
32
33 #[error("config error: {0}")]
35 Config(String),
36
37 #[error("namespace template variable `{0}` not available")]
39 TemplateVariable(String),
40
41 #[error("runtime error: {0}")]
43 Runtime(String),
44
45 #[error(transparent)]
46 Other(#[from] anyhow::Error),
47}
48
49pub(crate) type HyperResult<T> = Result<T, HyperError>;