# `NodeWire.Error`
[🔗](https://github.com/c2bw/nodewire/blob/v0.1.0/lib/node_wire/error.ex#L1)

Sanitized failure metadata returned by validation/codec paths and lifecycle observation.

`:stage` locates the failure (for example `:decode`, `:validation`, `:callback`,
`:encode` or `:outgoing_validation`). `:code` is a safe reason atom, or the
callback name for callback exceptions. `:connection_id` identifies the failed
instance. Exception text and arbitrary callback data are omitted from formatted
messages and inspection.

`:retryable?` defaults to false and is reserved metadata; it does not determine
client reconnection. The client's reason classification and configured
reconnect policy govern automatic attempts. Not every API error is this
struct: callers must also handle reason atoms and unknown-outcome tuples.

# `t`

```elixir
@type t() :: %NodeWire.Error{
  __exception__: term(),
  code: atom() | nil,
  connection_id: reference() | nil,
  retryable?: boolean(),
  stage: atom() | nil
}
```

---

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