# `ObanCodex.Error`
[🔗](https://github.com/genagent/oban_codex/blob/v0.7.1/lib/oban_codex/error.ex#L1)

A normalized execution error from the Codex wrapper.

`CodexWrapper.Exec.execute/2` returns a `%CodexWrapper.Result{}` whenever the
CLI starts and exits, including non-zero exits. Failures before a result is
available (timeouts, spawn failures, signals, and I/O failures) are plain
terms. `ObanCodex.Query` wraps those terms in this small stable shape so
workers and classifiers don't need to know runner internals.

A non-zero Codex exit remains a `%CodexWrapper.Result{success: false}` and is
classified separately as `:command_failed`.

# `kind`

```elixir
@type kind() ::
  :timeout
  | :spawn
  | :signal
  | :io
  | :unsupported
  | :invalid_args
  | :missing_session_id
  | :execution
  | atom()
```

# `t`

```elixir
@type t() :: %ObanCodex.Error{kind: kind(), message: String.t() | nil, reason: term()}
```

# `new`

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

Build an error, primarily for custom query functions and tests.

---

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