Skip to main content

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

1///
2/// ExternalLifecyclePendingReportError
3///
4#[derive(Debug, Eq, thiserror::Error, PartialEq)]
5pub enum ExternalLifecyclePendingReportError {
6    #[error(
7        "external lifecycle pending report schema version {actual} does not match expected {expected}"
8    )]
9    SchemaVersionMismatch { expected: u32, actual: u32 },
10    #[error("external lifecycle pending report field `{field}` is required")]
11    MissingRequiredField { field: &'static str },
12    #[error("external lifecycle pending report field `{field}` digest is stale")]
13    DigestMismatch { field: &'static str },
14    #[error("external lifecycle pending report field `{field}` does not match lifecycle source")]
15    SourceMismatch { field: &'static str },
16    #[error("external lifecycle pending report counters do not match action rows")]
17    CountMismatch,
18    #[error("external lifecycle pending report contains duplicate subject `{subject}`")]
19    DuplicateSubject { subject: String },
20}
21
22///
23/// ExternalLifecycleCheckError
24///
25#[derive(Debug, Eq, thiserror::Error, PartialEq)]
26pub enum ExternalLifecycleCheckError {
27    #[error("external lifecycle check schema version {actual} does not match expected {expected}")]
28    SchemaVersionMismatch { expected: u32, actual: u32 },
29    #[error("external lifecycle check field `{field}` is required")]
30    MissingRequiredField { field: &'static str },
31    #[error("external lifecycle check field `{field}` digest is stale")]
32    DigestMismatch { field: &'static str },
33    #[error("external lifecycle check field `{field}` does not match lifecycle source")]
34    SourceMismatch { field: &'static str },
35    #[error("external lifecycle check counters do not match source reports")]
36    CountMismatch,
37}
38
39///
40/// ExternalLifecycleHandoffError
41///
42#[derive(Debug, Eq, thiserror::Error, PartialEq)]
43pub enum ExternalLifecycleHandoffError {
44    #[error(
45        "external lifecycle handoff schema version {actual} does not match expected {expected}"
46    )]
47    SchemaVersionMismatch { expected: u32, actual: u32 },
48    #[error("external lifecycle handoff field `{field}` is required")]
49    MissingRequiredField { field: &'static str },
50    #[error("external lifecycle handoff field `{field}` digest is stale")]
51    DigestMismatch { field: &'static str },
52    #[error("external lifecycle handoff field `{field}` does not match lifecycle source")]
53    SourceMismatch { field: &'static str },
54    #[error("external lifecycle handoff contains duplicate subject `{subject}`")]
55    DuplicateSubject { subject: String },
56}
57
58///
59/// CriticalExternalFixReportError
60///
61#[derive(Debug, Eq, thiserror::Error, PartialEq)]
62pub enum CriticalExternalFixReportError {
63    #[error(
64        "critical external fix report schema version {actual} does not match expected {expected}"
65    )]
66    SchemaVersionMismatch { expected: u32, actual: u32 },
67    #[error("critical external fix report field `{field}` is required")]
68    MissingRequiredField { field: &'static str },
69    #[error("critical external fix report field `{field}` digest is stale")]
70    DigestMismatch { field: &'static str },
71    #[error("critical external fix report field `{field}` does not match lifecycle source")]
72    SourceMismatch { field: &'static str },
73}