# `Nous.Errors.ResponseDenied`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/errors.ex#L421)

Error when a `:post_response` hook denies a model response.

Returned as `{:error, %ResponseDenied{}}` by the agent run. The denied
response never reaches `:on_llm_new_message` callbacks, PubSub, plugins'
`after_response/3`, the transcript or tool execution. It is not
`Nous.Fallback.fallback_eligible?/1`: a policy denial is not a provider
failure, so it never switches to a fallback model.

# `t`

```elixir
@type t() :: %Nous.Errors.ResponseDenied{
  __exception__: true,
  message: String.t(),
  reason: String.t() | nil
}
```

---

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