Trivio Logo
Docs
v0.1.0
Financial Primitives

Error Handling & Invariants

Structured, deterministic error classes for invalid currency codes, negative amounts, and missing policies.

Trivio Error Hierarchy

TrivioValidationError: Thrown when grossMinor is negative, currency code is invalid, or mandatory parameters are omitted.

TrivioPolicyNotFoundError: Thrown when no settlement policy matches the transaction's acquirerId or currency.

TrivioRuleNotFoundError: Thrown when no fee rule matches the transaction criteria.