# `BB.Error.State.UnsupportedCommand`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/error/state/unsupported_command.ex#L5)

Command refused because the actuator doesn't accept that payload.

An actuator declares what it accepts with `c:BB.Actuator.command_payloads/1`,
defaulting to the six built-in `BB.Message.Actuator.Command` types. A driver
that narrows the list — a port that only speaks effort, say — gets everything
else refused here rather than handed to it to misinterpret.

Published commands are filtered out by the subscription and never reach the
actuator at all; this error is what the direct and synchronous transports see,
since they bypass pubsub.

# `t`

```elixir
@type t() :: %BB.Error.State.UnsupportedCommand{
  __exception__: term(),
  actuator: atom(),
  bread_crumbs: term(),
  class: term(),
  command: module(),
  path: term(),
  robot: module() | nil,
  splode: term(),
  stacktrace: term(),
  supported: [module()],
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.State.UnsupportedCommand{
  __exception__: term(),
  actuator: term(),
  bread_crumbs: term(),
  class: term(),
  command: term(),
  path: term(),
  robot: term(),
  splode: term(),
  stacktrace: term(),
  supported: term(),
  vars: term()
}
```

Create an `Elixir.BB.Error.State.UnsupportedCommand` without raising it.

## Keys

- :robot
- :actuator
- :command
- :supported

---

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