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

Raised when a lookup token is needed but the key provider cannot supply a lookup key.

`c:AshVault.KeyProvider.lookup_key/1` is an optional callback, so a provider written
before searchable fields existed — or a bespoke one — simply does not have it.
`AshVault.Verifiers.VerifyVault` catches that at compile time whenever it can see the
provider module, which is the overwhelmingly common case. This error is the runtime
backstop for the cases it cannot: a provider resolved through a `fun/2` or MFA vault,
or one that was not yet compiled when the resource was.

# `exception`

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

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

## Keys

- :provider
- :resource
- :field

---

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