Search documentation of Plushie

# Plushie.Event.CommandError (Plushie v0.7.2)

Copy Markdown View Source

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

## Fields

- `reason` - machine-readable reason from the renderer
- `id` - target widget ID
- `family` - command family name
- `widget_type` - native widget type when known
- `message` - human-readable error text

## Pattern matching

    def update(model, %CommandError{family: family, id: id, message: msg}) do
      Logger.warning("command #{family} failed on #{id}: #{msg}")
      model
    end

## Summary

### Types

t()

## Types

# t()

    @type t() :: %Plushie.Event.CommandError{
      family: String.t() | nil,
      id: String.t() | nil,
      message: String.t() | nil,
      reason: String.t(),
      widget_type: String.t() | nil
    }