Problem code 'read-while-queued' ​

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

A member of ProblemCode · stable · since 2.0.0

Strict fake only: code read a target that still had a write queued behind a transaction.

What to do ​

Don't read a target back with session.state() while its write is queued behind a transaction: show the value you wrote, then correct it from the write's Report once it settles. Inside a transaction's work, read through tx (tx.getSceneModel(), tx.state()), never session: a tx read sees the transaction's staged writes and records nothing.

ts
label.text = name;
const r = await session.select(group, material);
if (r.outcome !== 'committed') label.text = previous;

Where the declaration names it ​

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

Recorded by ​