Encryptor.Ecto.EncryptError exception (Encryptor.Ecto v0.2.0)

Copy Markdown View Source

Raised when the vault returns an error encrypting a value (ADR-0001 decision 6).

An encrypt failure is an infrastructure failure - a key provider that cannot be reached, a wrapping operation that failed - and not a validation error. It is deliberately not an Ecto.Type :error, which would surface as an Ecto.ChangeError a changeset could catch and then proceed past, writing the row without the value it was supposed to protect.

Summary

Types

t()

An exception in the encrypted-field family.

Types

t()

@type t() :: %Encryptor.Ecto.EncryptError{
  __exception__: true,
  column: term(),
  context_keys: term(),
  reason: term(),
  table: term(),
  tenant: term()
}

An exception in the encrypted-field family.