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

An actuator has not answered a command within the caller's timeout.

`delivery: :pubsub` waits for the actuator to accept or refuse a command, and
this is what the caller gets back when it stops waiting first. It is not a
rollback: the command is already in the actuator's mailbox, and it will
almost certainly be applied — late — whatever the caller does next. Sending
the next target on top of it queues behind it rather than replacing it.

Its severity is `:warning` because nothing has failed yet; the outcome is
still to come, and is not reported anywhere the caller can wait on.

# `t`

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

# `exception`

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

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

## Keys

- :robot
- :actuator
- :command
- :timeout_ms

---

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