Skip to main content

actr_hyper/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum HyperError {
5    /// Signed manifest section not found in package
6    #[error("package manifest section not found")]
7    ManifestNotFound,
8
9    /// Invalid manifest data format
10    #[error("invalid manifest: {0}")]
11    InvalidManifest(String),
12
13    /// binary_hash does not match recomputed result, package has been tampered with
14    #[error("binary hash mismatch: package integrity check failed")]
15    BinaryHashMismatch,
16
17    /// MFR signature verification failed
18    #[error("signature verification failed: {0}")]
19    SignatureVerificationFailed(String),
20
21    /// MFR certificate is untrusted (not registered with actrix or revoked)
22    #[error("untrusted manufacturer: {0}")]
23    UntrustedManufacturer(String),
24
25    /// AIS registration bootstrap failed
26    #[error("AIS bootstrap failed: {0}")]
27    AisBootstrapFailed(String),
28
29    /// Storage layer error
30    #[error("storage error: {0}")]
31    Storage(String),
32
33    /// Configuration error
34    #[error("config error: {0}")]
35    Config(String),
36
37    /// Namespace template variable missing
38    #[error("namespace template variable `{0}` not available")]
39    TemplateVariable(String),
40
41    /// Runtime management error (spawn failure, process crash, etc.)
42    #[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>;