Skip to main content
Version: Current

concurrency_error

@rotorsoft/act-root


@rotorsoft/act-root / act/src / concurrency_error

Function: concurrency_error()

concurrency_error(append, head): ConcurrencyError

Defined in: libs/act/src/utils.ts:167

The error a stale append raises, given the head the store found. A writer that named no expectedVersion reads as -1: only a race between the version check and the insert gets one here.

Parameters​

append​

expectedVersion?​

number

msgs​

readonly unknown[]

stream​

string

number

Returns​

ConcurrencyError