CouncilEx.Error (CouncilEx v0.1.0)

Copy Markdown View Source

Structured error captured during a council run.

M2a introduces three classified :kind values that the Runner uses to decide whether to retry: :transient, :permanent, :validation. M2b adds :cancelled for runs aborted via CouncilEx.cancel/1. Legacy M1 kinds (:provider_error, :member_error, :timeout, :invalid_output, :validation_error, :runtime_error) remain valid for backwards compatibility but are not retryable.

Summary

Functions

Whether the Runner should consider retrying after this error.

Types

kind()

@type kind() ::
  :transient
  | :permanent
  | :validation
  | :cancelled
  | :timeout
  | :invalid_output
  | :provider_error
  | :member_error
  | :validation_error
  | :runtime_error

t()

@type t() :: %CouncilEx.Error{
  context: map(),
  kind: kind(),
  member_id: atom() | nil,
  message: String.t() | nil,
  reason: term() | nil,
  round_name: atom() | nil,
  stacktrace: list() | nil
}

Functions

retryable?(error)

@spec retryable?(t()) :: boolean()

Whether the Runner should consider retrying after this error.