pub enum StoreError {
Io(Error),
Parse(ParseError),
ConclusionsParse(ParseError),
Version {
found: u32,
expected: u32,
},
ConclusionsVersion {
found: u32,
expected: u32,
},
Invalid(&'static str),
ConclusionsInvalid(&'static str),
AccountsParse(ParseError),
AccountsInvalid(&'static str),
}Expand description
What can go wrong when saving or loading a catalog.
A missing file is not an error: load reports it as Ok(None).
Variants§
Io(Error)
The catalog file, its parent folder or the temporary file used for the atomic rename could not be accessed.
Parse(ParseError)
The file exists but is not valid JSON, typically after being edited by hand or truncated by a full disk.
ConclusionsParse(ParseError)
The independent conclusions document is not valid JSON.
Version
The file was written by an incompatible version.
Fields
found: u32Version stamped in the file; 0 when the field is missing
altogether, which is how a pre-versioning catalog shows up.
expected: u32Version this build understands, that is FORMAT_VERSION.
ConclusionsVersion
The conclusions store uses a version this build cannot read.
Invalid(&'static str)
The JSON parsed but the catalog does not hold together: a row without an identifier, a track pointing at no file, non-contiguous identifiers. The payload names the specific breach.
ConclusionsInvalid(&'static str)
A malformed row in the conclusions store.
AccountsParse(ParseError)
Private credential document could not be parsed.
AccountsInvalid(&'static str)
Account metadata or credential policy is inconsistent.