# `ASM.Error`
[🔗](https://github.com/nshkrdotcom/agent_session_manager/blob/v0.9.2/lib/asm/error.ex#L1)

Canonical runtime error type for ASM.

# `domain`

```elixir
@type domain() ::
  :transport
  | :parser
  | :provider
  | :approval
  | :guardrail
  | :tool
  | :runtime
  | :config
```

# `kind`

```elixir
@type kind() ::
  :cli_not_found
  | :connection_failed
  | :timeout
  | :parse_error
  | :json_decode_error
  | :auth_error
  | :rate_limit
  | :buffer_overflow
  | :transport_error
  | :transport_busy
  | :queue_full
  | :at_capacity
  | :user_cancelled
  | :approval_denied
  | :guardrail_blocked
  | :tool_failed
  | :config_invalid
  | :unknown
```

# `t`

```elixir
@type t() :: %ASM.Error{
  __exception__: true,
  cause: term() | nil,
  domain: domain(),
  exit_code: integer() | nil,
  kind: kind(),
  message: String.t(),
  provider: atom() | nil,
  retryable: boolean() | nil
}
```

# `new`

```elixir
@spec new(kind(), domain(), String.t(), keyword()) :: t()
```

---

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