AshVault.Errors (AshVault v0.2.0)

Copy Markdown View Source

Error structs raised and returned by the AshVault crypto core.

Every error is a Splode error struct, which means it is a regular Exception that can be raised, but also carries a :class (always :invalid here) so it can be aggregated by Ash's error handling.

The modules are:

For MACs the taxonomy reads: KeyDestroyed — the scope was erased, so every tag it ever issued is revoked; KeyNotFound — the tag names a key version that does not exist; ProviderUnavailable — retry, nothing was decided; InvalidMac — the tag is wrong.

A destroyed key must never surface as AshVault.Errors.CiphertextIntegrityFailed: destruction is checked before any decryption is attempted.