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

Raised when the encryption scope for a field could not be resolved.

The most common cause is executing an Ash action without a tenant against a resource
that uses tenant-scoped encryption.

# `exception`

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

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

## Keys

- :resource
- :field
- :scope_module
- :reason
- :tenant
- :operation

---

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