OxL Справочник OxL
РусскийEnglish

data CompensationFailed

A saga could not undo a step after SAGA_UNDO_RETRIES attempts; the saga is stuck and needs manual work (§11.3, D-5103). step is the number (from 1) of the step whose compensation failed.

Example:

oxl✓ проверяется в CI
fn describe(e: CompensationFailed) -> str => "step {e.step} could not be undone: {e.cause}"

fn main() io {
  print(describe(CompensationFailed{ cause: "bank is down", step: 2 }))
}
Вывод
step 2 could not be undone: bank is down
@error pub(api) data CompensationFailed

С версии. 1.0.0-beta

Поля

pub(api) cause: str

Why the compensation failed.

pub(api) step: i64

Number (from 1) of the step whose compensation failed.

Определено в: std/core/types.oxl:1291

См. также