# Input-error code `'duplicate-rule-id'`

> 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`](../api/InputErrorCode.md) · stable · since 2.0.0

Two rules of one [`apply()`](../api/Writer.apply.md) `rules` list share an id (spec section 6.10, R3).

## What to do

Give each rule in one [`session.apply({ rules })`](../api/Writer.apply.md) list its own `id`, or leave `id` out.

```ts
await session.apply({ rules: [{ id: 'seat', query: { name: 'Seat' }, set: { visible: false } }, { id: 'legs', query: { name: 'Leg*' }, set: { visible: false } }] });
```

## Where the declaration names it

- [`RuleSpec.id`](../api/RuleSpec.id.md): Unique per owner and block: two with one id in one [`apply()`](../api/Writer.apply.md) list reject HoloInputError('duplicate-rule-id').
- [`Writer.apply`](../api/Writer.apply.md): Errors: rejects HoloInputError on an invalid spec ([`validate('scene', spec)`](../api/validate.md) checks its shape and its collections' keys and parents; `{ dryRun: true }` checks all this call checks and changes nothing), and 'duplicate-rule-id' when two of `rules` share an id (spec section 6.10, R3).

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