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

Raised when policy authorization for an action fails

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %Ash.Error.Forbidden.Policy{
  __exception__: true,
  action: term(),
  actor: term(),
  bread_crumbs: term(),
  changeset_doesnt_match_filter: term(),
  class: term(),
  context_description: term(),
  domain: term(),
  facts: term(),
  filter: term(),
  for_fields: term(),
  must_pass_strict_check?: term(),
  path: term(),
  policies: term(),
  policy_breakdown?: term(),
  resource: term(),
  scenarios: term(),
  solver_statement: term(),
  splode: term(),
  stacktrace: term(),
  subject: term(),
  vars: term()
}
```

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

## Keys

- :scenarios
- :facts
- :filter
- :actor
- :policy_breakdown?
- :must_pass_strict_check?
- :for_fields
- :subject
- :context_description
- :policies
- :resource
- :solver_statement
- :domain
- :action
- :changeset_doesnt_match_filter

# `get_breakdown`

Print a report of an authorization failure from authorization information.

Options:

- `:help_text?`: Defaults to true. Displays help text at the top of the policy breakdown.
- `:success?`: Defaults to false. Changes the messaging/graphics around to indicate successful policy authorization.
- `:must_pass_strict_check?`: Defaults to false. Adds a message about this authorization requiring passing strict check.

# `report`

Print a report of an authorization failure from a forbidden error

Options:

- `:help_text?`: Defaults to true. Displays help text at the top of the policy breakdown.

# `report`

---

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