Jido.Error.CompensationError exception (Jido v2.1.0)

View Source

Error for saga compensation failures.

Fields

  • message - Human-readable error message
  • original_error - The error that triggered compensation
  • compensated - Whether compensation succeeded
  • result - Result from successful compensation
  • details - Additional context

Summary

Types

t()

@type t() :: %Jido.Error.CompensationError{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  compensated: boolean(),
  details: map(),
  message: String.t(),
  original_error: any(),
  path: term(),
  result: any(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(msg)

@spec exception(opts :: Keyword.t()) :: %Jido.Error.CompensationError{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  compensated: term(),
  details: term(),
  message: term(),
  original_error: term(),
  path: term(),
  result: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.Jido.Error.CompensationError without raising it.

Keys

  • :message
  • :original_error
  • :compensated
  • :result
  • :details