Spectre.Provider.Failure (Spectre v0.3.0)

Copy Markdown View Source

Sanitized infrastructure failure returned by a provider call boundary.

Adapter-declared {:error, reason} values remain unchanged. This struct is reserved for failures introduced by execution itself: timeouts, exceptions, exits, throws, crashes, invalid replies, and invalid timeout configuration. It intentionally excludes prompts, inputs, adapter return values, and stack traces.

Summary

Types

kind()

@type kind() ::
  :timeout
  | :exception
  | :exit
  | :throw
  | :crash
  | :invalid_reply
  | :configuration

t()

@type t() :: %Spectre.Provider.Failure{
  kind: kind(),
  provider: atom(),
  reason: term(),
  retryable?: boolean(),
  timeout: timeout() | nil
}