# `OpenUI.Error`
[🔗](https://github.com/ideia4it/openui/blob/v0.1.1/lib/openui/error.ex#L1)

An error in the shape of language.md, section 8.3, ready to send back to the
model. `to_map/1` gives the wire form.

# `source`

```elixir
@type source() :: :parser | :runtime | :query | :mutation
```

# `t`

```elixir
@type t() :: %OpenUI.Error{
  code: String.t(),
  component: String.t() | nil,
  hint: String.t() | nil,
  message: String.t(),
  path: String.t() | nil,
  severity: nil | :warning,
  source: source(),
  statement_id: String.t() | nil,
  tool_name: String.t() | nil
}
```

# `to_map`

```elixir
@spec to_map(t()) :: %{required(String.t()) =&gt; String.t()}
```

The wire form: camelCase keys, without empty fields.

---

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