pub fn validate_id(id: &str) -> Result<()>Expand description
Refuse an identifier the crate’s own encodings cannot represent (D-061).
Called from ConceptUpsert::normalized and EdgeAssertion::normalized, so
a bad id is refused at the boundary with a typed error rather than becoming
an ambiguous log key three layers down.
The error type is the fix for defect J. This used to return
DbError::NotFound(id) for a malformed identifier, which says the opposite
of what happened — the id was not looked up and not missing; it was refused.
A caller matching on NotFound to decide whether to create the thing would
have been sent to create it again, with the same id, forever.