ObanCodex.Error (oban_codex v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

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

Types

kind()

@type kind() :: :timeout | :spawn | :signal | :io | :execution | atom()

t()

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

Functions

new(kind, opts \\ [])

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

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