# `Jido.Error.CompensationError`
[🔗](https://github.com/agentjido/jido/blob/v2.3.0/lib/jido/error.ex#L243)

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

# `t`

```elixir
@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()
}
```

# `exception`

```elixir
@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

