Skip to main content

Documentation Index

Fetch the complete documentation index at: https://pacta.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

When a transaction fails, Sui returns an abort code. Use this table to understand what went wrong and how to handle it in your app.
CodeNameWhat caused itHow to fix it
0ENotPartyCaller is not party A or party BCheck that the signing wallet is one of the two parties
1EInvalidStateFunction called in wrong agreement stateCheck agreement.state before calling — e.g. cannot approve a Cancelled agreement
2ENotArbiterCaller is not the arbiterOnly the arbiter address can call dispute resolution functions
3EExpiredAgreement has passed its expiry timeThe expiry timestamp has passed — cancel instead
4ENotExpiredCalled cancel_expired before expiryThe agreement has not expired yet — wait or use mutual cancel
5EUnlockTimeNotReachedCalled settle before unlock timeThe timelock has not expired — wait until unlockTimeMs
6EZeroDepositTried to deposit a zero-value coinEnsure the coin has a non-zero balance before depositing
7EConditionsNotMetCalled settle before all conditions are satisfiedCheck all conditions — both deposited, both approved, timelock passed
8ENotRecipientCaller tried to claim funds not allocated to themOnly the designated recipient can claim a specific allocation
9EDepositNotFoundTried to claim a coin type that was never depositedThe coin type requested does not exist in this agreement’s escrow
10EInvalidResolutionArbiter passed an invalid resolution valueResolution must be 0 (favour A) or 1 (favour B)
11ENotCreatorCaller is not the agreement creatorOnly the creator can cancel in Created state or update party B
12ENoArbiterTried to raise a dispute but no arbiter is setAgreement was created with arbiter = 0x0 — disputes not supported
13ECannotCancelBothDepositedTried to cancel after both parties depositedUse mutual cancel instead when both have deposited
14EHasUnclaimedAssetsTried to close agreement with assets still in escrowAll coins and objects must be claimed before the agreement can be destroyed
15EInvalidBpsBasis points value exceeds 10,000Split percentages must add up to 10,000 bps (100%)
16ENotAuthorizedCaller lacks the required capabilityOnly addresses holding AdminCap can call admin functions
17EAlreadyHookAttachedTried to attach a hook when one already existsDetach the existing hook before attaching a new one
18ENoHookAttachedTried to detach a hook that does not existNo hook is currently attached to this agreement
19EPartyBAlreadyDepositedTried to update party B after they depositedParty B address is locked once they deposit
20EAlreadyRecordedTried to record outcome twice in the registryrecord_outcome can only be called once per agreement
21EInvalidAgreementSettlement receipt does not match the agreementThe receipt was produced by a different agreement — check your PTB

Handling Errors in Your App

try {
  await pacta.settle(signer, { agreementId })
} catch (error) {
  const message = error?.message ?? ""

  if (message.includes("MoveAbort") && message.includes(", 7)")) {
    showError("Conditions not yet met — check that both parties have deposited and approved")
  } else if (message.includes("MoveAbort") && message.includes(", 5)")) {
    showError("Settlement is timelocked — funds cannot move yet")
  } else {
    showError("Transaction failed — please try again")
    console.error(error)
  }
}
Sui encodes abort codes in the error message as MoveAbort(..., CODE). Parse the code from the message to show users a friendly error.