Reference
Errors Reference
Numerical error codes (1-17), error symbols, causes, and recommended solutions.
Exhaustive catalog of all 17 contract errors declared in contracts/splitpay/src/errors.rs.
Complete Error Codes Table
| Code | Error Identifier | Trigger Condition |
|---|---|---|
| 1 | AlreadyInitialized | Contract admin has already been set. |
| 2 | NotInitialized | Operation invoked before contract initialize() was called. |
| 3 | PoolNotFound | Specified pool ID does not exist in ledger storage. |
| 4 | PaymentNotFound | Specified payment ID does not exist. |
| 5 | MemberNotFound | Member address is not registered in the target pool. |
| 6 | MemberAlreadyExists | Member address has already been added to this pool. |
| 7 | Unauthorized | Caller lacks required authority (owner, admin, or payer). |
| 8 | InvalidPoolStatus | Pool is Inactive and cannot accept or settle payments. |
| 9 | InvalidShare | Specified share BPS is 0 or exceeds 10,000. |
| 10 | InvalidTotalShares | Cumulative shares exceed 10,000 or do not equal 10,000 at payment time. |
| 11 | InvalidAmount | Payment amount is zero or negative (<= 0). |
| 12 | InvalidAsset | Asset address is invalid or lacks SEP-41 interface. |
| 13 | PaymentAlreadyExists | A payment with this ID already exists. |
| 14 | PaymentAlreadySettled | Payment has already been settled and is finalized. |
| 15 | InvalidPayment | Payment configuration does not match pool rules. |
| 16 | PoolAlreadyExists | A pool with this numerical ID already exists. |
| 17 | ArithmeticOverflow | Integer multiplication, addition, or division overflowed. |
Detailed Error Troubleshooting
How to resolve Error 10 (InvalidTotalShares): When creating or settling a payment, query get_pool_members(pool_id) and sum all share_bps. The sum must equal exactly 10,000 before create_payment or settle_payment will succeed.