# `AshVault.Errors.KeyDestroyed`
[🔗](https://github.com/jakeschurch/ash_vault/blob/main/lib/ash_vault/errors.ex#L174)

Raised when the key needed to decrypt a value was deliberately destroyed.

This is crypto-erasure: the data is unrecoverable by design.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %AshVault.Errors.KeyDestroyed{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  field: term(),
  key_version: term(),
  path: term(),
  resource: term(),
  scope: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.AshVault.Errors.KeyDestroyed` without raising it.

## Keys

- :scope
- :key_version
- :resource
- :field

---

*Consult [api-reference.md](api-reference.md) for complete listing*
