Skip to main content
The SDK never throws a bare Error: every failure mode has a dedicated class, so handlers branch on instanceof instead of parsing messages. Two layers throw. Flow errors come from @iris-credit/iris-sdk: the local validation flows run when they are created, before anything is signed or sent. Entity errors come from @iris-credit/core-sdk: the offline math mirroring the contract’s own failure conditions, plus the registry lookups behind the fetchers.
Most validation runs when the flow is created on the entity, as above. buildTx adds only the signature checks under Requirements and signatures.

Flow errors

Thrown by the client.iris.core(chainId) flows while validating what the contract would reject. All are importable from the package root.

Inputs and loan state

Quote validation

Thrown by take:

Withdrawal ceilings

Requirements and signatures

Thrown while resolving requirements or consuming their signatures in buildTx:

Client checks

Bundler encoding

The BundlerErrors namespace covers Bundler3 action encoding:

Entity errors

@iris-credit/core-sdk throws where the model itself cannot proceed. The IrisCoreErrors namespace mirrors the contract’s failure conditions inside the offline math, so a transition that would revert onchain throws the matching class offline:

Registry lookups