Skip to content

requireAbilityDigest

requireAbilityDigest(context?): string

Defined in: packages/pipeline-casl/src/helpers/ability-digest.ts:60

abilityDigest, failing closed: it throws instead of returning undefined when no ability is present. Use it where a missing ability must stop the operation, such as an idempotency replay scope, whose factory must throw rather than let an operation run without a scope.

IPipelineContext<unknown, unknown>

The pipeline execution; omitted, the running one.

string

The 64-character hex digest.

When no ability is present.

When a rule holds a value that is not plain JSON.

idempotent({ keyFactory, replayScopeFactory: requireAbilityDigest });