# `Decree.Middleware.CommandId`
[🔗](https://github.com/sparkle-space/decree/blob/v0.1.0/lib/decree/middleware/command_id.ex#L1)

An internal `Decree.Middleware` that refuses a command whose `command_id` is not a
lowercase canonical UUID.

It is a default middleware, like `Decree.Middleware.ExtractAggregateIdentity`: it runs
after every middleware a router registers and before the identity is extracted, on an
aggregate route and a decision route alike. It answers `Decree.Command.check_id/1` on the
command's `:command_id` field, a missing field being nil, and halts on a refusal, so no
aggregate is opened and no decision runs. It never reads the dispatch's `command_uuid`, and
never writes the command.

# `after_dispatch`

# `after_failure`

# `before_dispatch`

---

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