Skip to main content

canic_host/deployment_truth/lifecycle/error/authority/
mod.rs

1///
2/// LifecycleAuthorityReportError
3///
4#[derive(Debug, Eq, thiserror::Error, PartialEq)]
5pub enum LifecycleAuthorityReportError {
6    #[error(
7        "lifecycle authority report schema version {actual} does not match expected {expected}"
8    )]
9    SchemaVersionMismatch { expected: u32, actual: u32 },
10    #[error("lifecycle authority report field `{field}` is required")]
11    MissingRequiredField { field: &'static str },
12    #[error("lifecycle authority report field `{field}` digest is stale")]
13    DigestMismatch { field: &'static str },
14    #[error("lifecycle authority report contains duplicate subject `{subject}`")]
15    DuplicateSubject { subject: String },
16    #[error("lifecycle authority report counters do not match authority rows")]
17    CountMismatch,
18}
19
20///
21/// ExternalLifecyclePlanError
22///
23#[derive(Debug, Eq, thiserror::Error, PartialEq)]
24pub enum ExternalLifecyclePlanError {
25    #[error("external lifecycle plan schema version {actual} does not match expected {expected}")]
26    SchemaVersionMismatch { expected: u32, actual: u32 },
27    #[error("external lifecycle plan field `{field}` is required")]
28    MissingRequiredField { field: &'static str },
29    #[error("external lifecycle plan field `{field}` digest is stale")]
30    DigestMismatch { field: &'static str },
31    #[error("external lifecycle plan field `{field}` does not match deployment truth source")]
32    SourceMismatch { field: &'static str },
33    #[error("external lifecycle plan status does not match role partitioning")]
34    StatusMismatch,
35    #[error("external lifecycle plan contains duplicate subject `{subject}`")]
36    DuplicateSubject { subject: String },
37}