Skip to main content

Interface: AmnesiaErrorContext

Defined in: types.ts:280

Context passed to the provider's onError handler.

Phases:

  • "push" — the command's redo (or transaction's work) threw on initial application. The entry is not added to the stack; the original error is also re-thrown to the caller.
  • "undo" / "redo" — the entry's handler threw. The entry stays on its current stack so the application can retry. recoverable: true.
  • "busy" — the call arrived while another op was in flight and was dropped. recoverable: true (the caller can retry after pending becomes false).
  • "stale" — an in-flight async op detected that clear() (or dispose()) ran during its await. The entry is dropped. recoverable: false.
  • "rollback" — a buffered undo threw while a transaction was rolling back after its work rejected or stale-dropped. One error per failing undo. The application's state may be partially restored; the original work rejection (when applicable) still propagates to the caller. recoverable: false.

Properties

entryId?

optional entryId?: number

Defined in: types.ts:284

The entry id involved, when known.


label?

optional label?: string

Defined in: types.ts:286

Label of the involved entry, when known.


phase

phase: "push" | "undo" | "redo" | "busy" | "stale" | "rollback"

Defined in: types.ts:282

Which lifecycle phase produced the error.


recoverable?

optional recoverable?: boolean

Defined in: types.ts:293

Whether the application could meaningfully retry the operation. true for "undo" / "redo" / "busy" failures, false for "push" and "stale". Always present from the runtime — the optionality is for forward compatibility.