# `Codex.ApprovalError`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/approval_error.ex#L1)

Error returned when an approval policy denies a tool invocation.

# `t`

```elixir
@type t() :: %Codex.ApprovalError{
  __exception__: true,
  message: String.t(),
  reason: String.t() | nil,
  tool: String.t()
}
```

# `new`

```elixir
@spec new(String.t(), String.t()) :: t()
```

---

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