# Reason `'conflict'`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` and `tables/problems.json` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

A member of [`Reason`](../api/Reason.md) · stable · since 2.0.0

`expectRevision` did not match, the `expectGroup` you passed was not open at the call, an [`applyPatch`](../api/Writer.applyPatch.md) 'test' failed, or a queued [`applyPatch`](../api/Writer.applyPatch.md) path or [`select`](../api/Writer.select.md) group or material that resolved at the call no longer resolves at the write's turn (spec section 6.4).

## Where the declaration names it

- [`CommitOptions.expectGroup`](../api/CommitOptions.expectGroup.md): It is refused 'conflict' at its call unless that group is open then (a shopper write's call, a call of [`undo()`](../api/Session.undo.md) or [`redo()`](../api/Session.redo.md), `commit()`, its timeout or its signal ends it); a write called while the group is open is never refused because the group ended before its commit point.
- [`CommitOptions.expectRevision`](../api/CommitOptions.expectRevision.md): A mismatch refuses the write ('refused', reason 'conflict'); nothing runs.
- [`HistoryGroup`](../api/HistoryGroup.md): A write called once it is not open that passes it as `expectGroup` is refused 'conflict'.
- [`Writer.applyPatch`](../api/Writer.applyPatch.md): Preconditions: `expectRevision` plus 'test' operations; a failed 'test' refuses with reason 'conflict', and so does a path that resolved at the call and no longer resolves at the write's turn in the queue (a rollback or an earlier commit removed its node); nothing of the patch applies.
- [`Writer.select`](../api/Writer.select.md): One that was there at the call and is gone at its turn in the queue (a rollback or an earlier commit removed it) refuses with reason 'conflict' and changes nothing (spec section 6.4).

The set is open: handle a code you don't know (`'other'`).
