# `Ash.Error.Forbidden`
[🔗](https://github.com/ash-project/ash/blob/v3.23.1/lib/ash/error/forbidden.ex#L5)

Used when authorization for an action fails

# `t`

```elixir
@type t() :: %Ash.Error.Forbidden{
  __exception__: true,
  action_input: Ash.ActionInput.t() | nil,
  bread_crumbs: term(),
  changeset: Ash.Changeset.t() | nil,
  class: term(),
  error_class?: term(),
  errors: term(),
  path: term(),
  query: Ash.Query.t() | nil,
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %Ash.Error.Forbidden{
  __exception__: true,
  action_input: term(),
  bread_crumbs: term(),
  changeset: term(),
  class: term(),
  error_class?: term(),
  errors: term(),
  path: term(),
  query: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.Ash.Error.Forbidden` without raising it.

## Keys

- :error_class?
- :changeset
- :query
- :action_input
- :errors

# `message`

---

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