Error reference
Every error the uruoi program returns, with its code, what caused it and what to do. Anchor custom errors start at 6000; the SDK exports the same table as ERRORS.
| Code | Name | Message | What to do |
|---|---|---|---|
| 6000 | NotUpgradeAuthority | Signer is not the program upgrade authority | Only the upgrade authority can run initialize. |
| 6001 | UriTooLong | Metadata URI is too long | Keep the uSOL metadata URI at 200 bytes or less. |
| 6002 | NotAdmin | Signer is not the admin | Admin instructions need the admin key. |
| 6003 | NotPendingAdmin | Signer is not the pending admin | Only the proposed key can accept the admin seat. |
| 6004 | TooManyCollaterals | Collateral list is full | The program holds at most 4 collaterals. |
| 6005 | InvalidMaxLtv | Borrow limit must be above zero and at most 80% | Pick 0 < max_ltv_bps <= 8000. |
| 6006 | InvalidUnwindLtv | Unwind threshold must sit above the borrow limit and at most 95% | Pick max_ltv_bps < unwind_ltv_bps <= 9500. |
| 6007 | UnwindLtvLowered | Unwind threshold can only be raised | Thresholds never go down, so live positions cannot be made unwindable. |
| 6008 | UnsupportedRateSource | Rate source is neither an SPL stake pool nor the Marinade state | Pass the pool account or the Marinade state. |
| 6009 | InvalidRateSource | Rate source data does not match its program's layout | The account is not a stake pool or Marinade state. |
| 6010 | RateSourceMintMismatch | Rate source prices a different mint | Pass the rate source for this LST. |
| 6011 | StaleRate | Stake pool has not been updated for the current epoch | Wait for (or send) the pool's epoch update, then retry. Syncing still works. |
| 6012 | ZeroAmount | Amount must be greater than zero | Send a positive amount. |
| 6013 | MintingPaused | Borrowing is paused for this collateral | New borrowing is off for this LST; repaying, withdrawing, syncing and redeeming still work. |
| 6014 | ExceedsMaxLtv | Debt would exceed the borrow limit | Borrow less, deposit more, or withdraw less. |
| 6015 | DebtCeilingReached | Collateral debt ceiling reached | The LST's total debt is at its ceiling; try a smaller amount or another collateral. |
| 6016 | InsufficientShares | Position does not hold that much collateral | Withdraw or repay with collateral within your shares. |
| 6017 | NoDebt | Position has no debt | Nothing to repay. |
| 6018 | InsufficientBuffer | Redemption exceeds what the transmuter holds | Redeem a smaller amount; buffers refill as yield is swept. |
| 6019 | ZeroOutput | Amount is too small to pay out a single base unit | Use a larger amount. |
| 6020 | CollateralAccountsMismatch | Remaining accounts must list every collateral in index order | Pass four accounts per collateral, ordered by each collateral's index. |
| 6021 | PositionHealthy | Position is not above its unwind threshold | The position cannot be unwound; this is the normal state. |
| 6022 | PositionNotEmpty | Position still holds collateral or debt | Repay and withdraw everything before closing. |
| 6023 | MintMismatch | Token account holds a different mint | Pass a token account for the right mint. |
| 6024 | MathOverflow | Math overflow | Amounts this large are not supported; split the operation. |
| 6025 | FreezableMint | LST mint has a freeze authority that could freeze the vault | Admin only: an LST whose mint can be frozen is refused as collateral. JitoSOL and mSOL have no freeze authority. |
Reading an error
A failed transaction log ends with a line such as:
Program log: AnchorError occurred. Error Code: ExceedsMaxLtv. Error Number: 6014. Error Message: Debt would exceed the borrow limit.
import { ERRORS } from "./sdk/src/index.js"
function explain(code: number) {
return ERRORS[code] ?? `unknown error ${code}`
}
Errors you will see in normal use
StaleRateright after an epoch boundary, until the stake pool's update runs. Retry a few minutes later.ExceedsMaxLtvwhen the app's maximum was computed a moment before a rate change. Borrow slightly less.PositionHealthyfor anyone trying to unwind a position that is fine, which is nearly always.