Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / SettlementError

Class: SettlementError

Defined in: packages/core/dist/index.d.ts

The segment computed its outcome but a settlement write failed with a NON-fencing store error, so nothing durable records that the run settled. handle.result rejects with this instead of resolving, because a caller acting on an unrecorded outcome is exactly the split view an authoritative store exists to prevent. stage names the write that failed: 'run-settle' is the journal decision entry (when it fails the terminal meta write is SKIPPED, so the projection can never run ahead of the journal), 'meta' is the terminal RunMeta projection (the journal settle IS durable; only the projection is behind, the same residue a crash between the two writes leaves). Every entry the run appended before settlement is already durable, so recovery is deterministic: resume the run and replay re-settles the same outcome without a provider call, or reconcile the store with rulvar runs audit [--repair]. A superseded segment's fencing rejection of the settle append (LeaseHeldError) is NOT this error: it rejects with the typed SupersededError (RV1009), while a meta-only lease bounce over an already durable settle stays swallowed (the journal records the outcome; only the projection belongs to the current holder). data records { runId, runStatus, stage }.

Extends

Constructors

Constructor

ts
new SettlementError(message, opts): SettlementError;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
messagestring
opts{ cause?: unknown; runId: string; runStatus: string; stage: "run-settle" | "meta"; }
opts.cause?unknown
opts.runIdstring
opts.runStatusstring
opts.stage"run-settle" | "meta"

Returns

SettlementError

Overrides

RulvarError.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesInherited fromDefined in
codereadonly"settlement""settlement"-RulvarError.code-packages/core/dist/index.d.ts
data?readonlyJsonundefined--RulvarError.datapackages/core/dist/index.d.ts
retryablereadonlybooleanundefined--RulvarError.retryablepackages/core/dist/index.d.ts
runIdreadonlystringundefined---packages/core/dist/index.d.ts
runStatusreadonlystringundefinedThe outcome status the segment computed and could not record.--packages/core/dist/index.d.ts
stagereadonly"run-settle" | "meta"undefinedThe settlement write that failed first.--packages/core/dist/index.d.ts

Methods

toWire()

ts
toWire(): WireError;

Defined in: packages/core/dist/index.d.ts

Returns

WireError

Inherited from

RulvarError.toWire