# `Arc.CommandResult`
[🔗](https://github.com/Cratis/Arc.Elixir/blob/main/lib/arc/result.ex#L4)

The outcome of executing a command, shaped as the Arc command result envelope.

# `t`

```elixir
@type t() :: %Arc.CommandResult{
  authorization_failure_reason: term(),
  authorized?: term(),
  correlation_id: term(),
  events: term(),
  exception_messages: term(),
  exception_stack_trace: term(),
  response: term(),
  validation_results: term()
}
```

# `status`

```elixir
@spec status(t()) :: 200 | 400 | 403 | 500
```

The HTTP status the Arc contract maps this result to.

# `success?`

```elixir
@spec success?(t()) :: boolean()
```

Whether the command was authorized, valid and free of exceptions.

# `to_wire`

```elixir
@spec to_wire(t()) :: map()
```

Converts the result to the wire envelope.

---

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