BB.Error.State.UnsupportedCommand exception (bb v0.27.0)

Copy Markdown View Source

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

An actuator declares what it accepts with 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.

Summary

Types

t()

@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()
}

Functions

exception(args)

@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