# `ExWapp.Error`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/error.ex#L1)

Structured error returned by high-level ExWapp client operations.

The `:operation` field names the public API call, while `:phase` narrows the
failure to the protocol/integration step that failed.

# `t`

```elixir
@type t() :: %ExWapp.Error{
  __exception__: term(),
  message_id: String.t() | nil,
  metadata: map(),
  operation: atom(),
  phase: atom() | nil,
  reason: term(),
  trace_id: term() | nil
}
```

# `new`

```elixir
@spec new(atom(), atom() | nil, term(), keyword()) :: t()
```

Builds an ExWapp error.

---

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