#[non_exhaustive]pub enum DppError {
NotFound(String),
InvalidTransition {
current: String,
required: String,
},
Validation(ValidationErrors),
Signing(String),
Serialisation(String),
RemovedEnvelopeKey {
removed: &'static str,
replacement: &'static str,
},
SchemaIncompatible(UpcastError),
RetentionLocked,
SuccessionUnresolvable {
id: String,
reason: String,
},
Internal(String),
}Expand description
Top-level error type for the DPP domain.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(String)
InvalidTransition
Validation(ValidationErrors)
Signing(String)
Serialisation(String)
RemovedEnvelopeKey
A stored document carries an envelope key this build has removed, so it
predates a rename. Reading it would succeed while silently dropping the
field, which is why it is refused instead. See
crate::passport::REMOVED_ENVELOPE_KEYS.
Fields
SchemaIncompatible(UpcastError)
A stored document’s product group data predates the current schema by more
than the registered lens chain can bridge — e.g. a required field the
document was written before, with no source data anywhere to derive it
from. Not a bug to fix by writing a lens: some gaps have no honest
transform. See crate::schemas::lens.
RetentionLocked
Returned when an attempt is made to delete or overwrite a passport that has been published and is therefore subject to EU ESPR retention obligations. Published passports must remain accessible for the legally defined period under the applicable delegated act (typically 10–15 years).
SuccessionUnresolvable
The forward walk from a passport to the record that replaced it could not produce one answer.
Distinct from Ok(None), which is the ordinary “nothing supersedes this”
and is not an error. This is the store holding a shape the succession
edge does not permit — two records claiming one predecessor, a cycle, or
a chain longer than the walk will follow. Each is a reason the question
has no answer rather than a negative one, and returning the
first-sorted row instead would answer “which record am I holding” wrongly
and silently.
Fields
Internal(String)
Trait Implementations§
Source§impl Error for DppError
impl Error for DppError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()