# Input-error code `'option-in-transaction'`

> 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

A commit option passed through a `tx` by an untyped call; always thrown at the call.

## What to do

Commit options (`undo`, `origin`, `actor`, `checkpoint`, `supersede`, `expectRevision`, `expectGroup`, `dryRun`) belong to the transaction: pass them to [`session.transaction(work, options)`](../api/Session.transaction.md) and call `tx` members with member options only, as the error's `fix` says.

```ts
await session.transaction(async (tx) => { await tx.select(group, material); }, { undo: 'Pick fabric' });
```

## Where the declaration names it

- [`CommitOptions`](../api/CommitOptions.md): Through a `tx` they are a type error ([`NoCommitOptions`](../api/NoCommitOptions.md)); an untyped call that passes one throws HoloInputError('option-in-transaction') with a `fix`.
- [`HoloInputError`](../api/HoloInputError.md): Exception: 'option-in-transaction' (a commit option passed through a `tx` by an untyped call) always throws at the call.

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