# Input-error code `'unknown-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

An id that names nothing the member takes, e.g. a [`select`](../api/Writer.select.md) group that is no global-material GroupNode, a view not in [`camera.views`](../api/Camera.views.md), an [`ImageRef`](../api/ImageRef.md) or [`ShapeRef`](../api/ShapeRef.md) that is not live, a `{ materialId }` that names no material, an [`applyPatch`](../api/Writer.applyPatch.md) `defaultNodeId` that names no child of its node, or a [`describe(node)`](../api/Session.describe.md) id that names no ModelNode; `didYouMean` names known ids.

## What to do

[`session.select(group, material)`](../api/Writer.select.md) takes the `nodeId` of a global-material GroupNode and of one of its MaterialNode children, never a `label`: look both up in [`session.getSceneModel()`](../api/Writer.getSceneModel.md) (below), and `didYouMean`, when set, lists known ids. For [`session.camera.views.go(name)`](../api/Camera.views.go.md) use a name from `session.document.camera.views` ([`Session.document`](../api/Session.document.md)); for an [`ImageRef`](../api/ImageRef.md) or [`ShapeRef`](../api/ShapeRef.md) that is not live, write the canvas or the arrays again.

```ts
type StoredNode = DeepReadonly<ConfiguratorNode>; // both from the package's /contract entry
const all = (ns: readonly StoredNode[]): StoredNode[] => ns.flatMap((n) => [n, ...all(n.children ?? [])]);
const group = all(session.getSceneModel()?.root ?? []).find((n) => n.label === 'Upholstery');
const fabric = group?.children?.find((m) => m.label === 'linen-grey');
if (group && fabric) await session.select(group.nodeId, fabric.nodeId);
```

## Where the declaration names it

- [`Camera.views.go`](../api/Camera.views.go.md): Errors: rejects HoloInputError 'unknown-id'.
- [`HoloInputError.didYouMean`](../api/HoloInputError.didYouMean.md): known ids for 'unknown-id'.
- [`IGroupNode.defaultNodeId`](../api/IGroupNode.defaultNodeId.md): Written through [`applyPatch`](../api/Writer.applyPatch.md) at `/model/node/{id}/defaultNodeId`, a non-empty value names a child once the patch has run, or the call rejects HoloInputError 'unknown-id' with the children as `didYouMean`; null and '' still write.
- [`ImageRef`](../api/ImageRef.md): A write naming a ref that is not live (another session's, or one dropped) rejects HoloInputError 'unknown-id' at its path and applies nothing; write the canvas again.
- [`JsonPatchOp`](../api/JsonPatchOp.md): [`applyPatch`](../api/Writer.applyPatch.md) writes these: - `/model/node/{nodeId}/{field}`: a scene-model node wherever it sits in the tree; `field` is a field of the stored node format or one the node already carries ('unknown-field' otherwise), and a `defaultNodeId` written here names one of its children, or is null or '' ('unknown-id' otherwise); - `/model/node/{nodeId}/children` and `/model/root`: ordered lists of child …
- [`Session.describe`](../api/Session.describe.md): Errors: throws HoloInputError 'unknown-id' when `node` names no ModelNode of the scene model (a typo, a GroupNode or MaterialNode, a removed node); `didYouMean` names close ModelNode ids.
- [`ShapeRef`](../api/ShapeRef.md): Writing it back reuses that geometry while it is live in this session, as an [`ImageRef`](../api/ImageRef.md) is: the same holders, an undo or redo step included, keep its arrays, and a ref that is not live rejects 'unknown-id' (send the arrays again).
- [`Writer.applyPatch`](../api/Writer.applyPatch.md): Errors: rejects HoloInputError on a bad path (a collection, stage-order or named-material path among them: the feed names those, another member writes them, and `fix` says which; see [`JsonPatchOp`](../api/JsonPatchOp.md)), or 'invalid-input' on a node `scale` with a 0 or non-finite component, or a non-finite number anywhere in a value (spec section 3.4); or 'unknown-field' on a node field path the stored format doesn't…
- [`Writer.select`](../api/Writer.select.md): Errors: rejects HoloInputError 'unknown-id' when `group` is not a global-material GroupNode (a variant GroupNode's `nodeId` included) or `material` is not one of its MaterialNodes at the call.

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