# `HoloScopeError`

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

Class · `import { HoloScopeError } from '@holostep-configurators/runtime-client';` · stable · since 2.0.0 · section 3. Errors

A write through the wrong writer. Thrown at the call when, while `work` or a [`beforeCommit`](Session.beforeCommit.md)
function is synchronously on the stack, code writes through `session` (or a session-bound
handle), calls [`session.transaction()`](Session.transaction.md), calls [`idle()`](Session.idle.md), or starts a load or calls [`capture()`](Session.capture.md)
inside [`beforeCommit`](Session.beforeCommit.md).
[`fix`](HoloScopeError.fix.md) names the right call, e.g. "use tx.find(part).set(...)". Never swallow it: it is a bug.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="constructor"></a>[`constructor`](HoloScopeError.constructor.md) | constructor | As the runtime builds it; `hook` names the [`beforeCommit`](Session.beforeCommit.md) function on the stack (else the misuse was in a transaction's `work`). |
| <a id="op"></a>[`op`](HoloScopeError.op.md) | property | The operation the misuse happened in (the transaction or commit). |
| <a id="member"></a>[`member`](HoloScopeError.member.md) | property | The member that was called, e.g. 'session.select'. |
| <a id="fix"></a>[`fix`](HoloScopeError.fix.md) | property | The right call. |

## Declaration

```ts
export declare class HoloScopeError extends TypeError {
  constructor(op: OpId, member: string, fix: string, hook?: string);
  readonly op: OpId;
  readonly member: string;
  readonly fix: string;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `HoloScopeError` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | pass: 6 apps (fleet cross-check: app-bcb7ef21da, app-e61a0b42ad, app-f3598fad77, app-fb16dd1985, app-fd09090420, configurator-template) |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
