class CosmosConcurrentModificationError
extends Error
Since 0.2.0

Thrown when a Cosmos update loses an optimistic-concurrency race.

An update whose payload exceeds the per-request patch limit is served by a read-merge-replace, and that replace is conditional on the _etag the read returned. A concurrent writer between the two answers 412, which is surfaced here rather than silently overwriting the other writer's row.

Constructors

CosmosConcurrentModificationError(message: string)

Creates the error.

Parameters
message: string

The full diagnostic, safe to log

Properties

readonly
name: string

Discriminant for consumers that cannot use instanceof across realms.

Usage

import { CosmosConcurrentModificationError } from "database-plugin/src/index.ts";