NodeWire.Error exception (NodeWire v0.1.0)

Copy Markdown View Source

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.

Summary

Types

t()

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