Skip to content
1 min read · 78 words

Function: createOrderingViolationError()

ts
function createOrderingViolationError(
  count: number,
  firstDetail: string,
  violations: BlockingOrderingViolation[],
): OrderingViolationException;

Defined in: src/batteries/validation/exceptions.ts:58

Constructs an ordering rejection and attaches its typed blocking violation list.

Parameters

ParameterTypeDescription
countnumberNumber of blocking violations.
firstDetailstringHuman-readable detail for the first violation.
violationsBlockingOrderingViolation[]Complete list of violations that may feed the rejection path.

Returns

OrderingViolationException

The enriched exception instance.