Input-error code 'collection-role-mismatch' ​

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 InputErrorCode · stable · since 2.0.0

collection() on a live name with another role.

What to do ​

The name is live with another role: call session.collection(name) without options to get it, or dispose() it first and create it again with the new role.

ts
session.collection('props').dispose();
await session.collection('props', { role: 'scenery' }).load(lampUrl, { key: 'lamp' });

Where the declaration names it ​

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