Every program error, its code, what it means and what to do. Codes start at 6000, the Anchor custom error base.
| Code | Name | Meaning | What to do |
|---|---|---|---|
| 6000 | NotAuthority | Signer is not the pool authority | Sign with the pool authority key. |
| 6001 | NotPendingAuthority | Signer is not the pending authority | Sign with the key named in propose_authority. |
| 6002 | NotKeeper | Signer is not the keeper | Sign with the keeper key set on the pool. |
| 6003 | NotOwner | Signer does not own this position or LP account | Sign with the wallet that owns the position or LP account. |
| 6004 | NotUpgradeAuthority | Only the program upgrade authority may initialize the pool | Initialize with the program upgrade authority. |
| 6005 | Paused | New positions and deposits are paused | Wait for the authority to resume; exits and withdrawals keep working. |
| 6006 | InvalidMint | Mint must be a 6-decimal token | Use a 6-decimal USDC mint. |
| 6007 | WrongMint | Token account has the wrong mint | Pass the USDC token account of the right mint. |
| 6008 | InvalidPoolParams | Fee, reward, cooldown or grace parameter out of range | Keep fees, reward, cooldown and grace inside their bounds. |
| 6009 | InvalidVenue | Unknown venue | Use 0 for Hyperliquid or 1 for Binance. |
| 6010 | InvalidCoin | Coin must be 1-8 uppercase ASCII letters or digits, zero padded | Use 1 to 8 uppercase letters or digits. |
| 6011 | InvalidSchedule | Period must divide a day and the maturity must sit on a period boundary in the future | Pick a period that divides a day and a future maturity on a period boundary. |
| 6012 | InvalidRateParams | Rate cap, skew, spread, exposure share, EMA weight or anchor out of range | Keep rate cap, skew, spread, cap share, EMA weight and anchor inside their bounds. |
| 6013 | PrintOutOfOrder | Print must be for the next unprinted period | Post the next unprinted period, with source_ts at its exact end. |
| 6014 | PrintFromFuture | Print timestamp is in the future | Wait until the period has ended on chain time. |
| 6015 | RateOutOfBounds | Funding print exceeds the per-period bound | Check the source; prints above 5% of notional per period are refused. |
| 6016 | MarketExpired | Market is past maturity plus the settlement grace | Settle positions; the market is past maturity plus grace. |
| 6017 | MarketMatured | Every period of this market is printed | Every period is printed; settle instead. |
| 6018 | MarketStale | A finished period has not been printed yet | Wait for the keeper to post the finished period, then retry. |
| 6019 | NotSettleable | Market is neither fully printed nor expired | Wait for the last print or for maturity plus grace. |
| 6020 | NotionalOutOfRange | Notional out of range | Use a notional from 1 USDC up to the maximum. |
| 6021 | InsufficientMargin | Margin below the initial requirement | Add margin up to the initial requirement shown in the ticket. |
| 6022 | ExposureCapExceeded | Trade would push the pool past this market's exposure cap | Trade a smaller size, or take the other side, which always fits. |
| 6023 | SlippageExceeded | Fixed rate worse than the trader's limit | Refresh the quote or widen your limit rate. |
| 6024 | PoolEmpty | Pool has no capital to quote against | Wait for the first liquidity deposit. |
| 6025 | PoolInsolvent | Pool cash cannot cover this payment | The pool cash cannot cover this payment; retry after settlements or deposits. |
| 6026 | NotLiquidatable | Position is above maintenance margin | The position is above maintenance; nothing to do. |
| 6027 | MarketMismatch | Position belongs to another market | Pass the market the position belongs to. |
| 6028 | InvalidMarketSet | Remaining accounts must be every active market, sorted by address | Pass every active market, sorted by address, as remaining accounts. |
| 6029 | ZeroAmount | Amount must be greater than zero | Use an amount above zero. |
| 6030 | DepositTooSmall | First deposit must exceed the locked minimum liquidity | Make the first deposit larger than the locked minimum liquidity. |
| 6031 | RoundsToZero | Deposit or withdrawal rounds to zero | Use a larger amount. |
| 6032 | InsufficientShares | Not enough unlocked shares | Request at most your unlocked shares. |
| 6033 | CooldownActive | Withdrawal cooldown has not elapsed | Wait until the cooldown ends. |
| 6034 | NothingPending | No withdrawal is pending | Call request_withdraw first. |
| 6035 | WithdrawalExceedsFreeCapital | Withdrawal would leave open exposure above the caps | Withdraw less, or wait for exposure to shrink. |
| 6036 | NothingToSweep | Fee vault is empty | Nothing to do; the fee vault is empty. |
| 6037 | MarketHasPositions | Market still has open positions | Settle or close every position first. |
| 6038 | MathOverflow | Arithmetic overflow | Use smaller values; the input overflowed the checked math. |
Reading an error in the app
The app maps each code to a plain sentence in the toast and keeps the transaction signature next to it, so you can open it in an explorer.
const code = (e as { error?: { errorCode?: { number: number } } }).error?.errorCode?.number