# Earn Error Codes

| Error                                                        | Description                                                                   | Type of Error |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------- | ------------- |
| ZERO\_AMOUNT                                                 | Thrown when the amount is zero                                                | Common        |
| ZERO\_ADDRESS                                                | Thrown when the address is zero                                               | Common        |
| INPUT\_ARRAY\_MISMATCH                                       | Thrown when the array input has a mismatch for token length                   | Common        |
| TOO\_LONG\_DELAY(uint256 delayTime)                          | Thrown when the delay time is too long                                        | Oracle        |
| NO\_MAX\_DELAY(address token)                                | Thrown when there is no maximum delay set for the token                       | Oracle        |
| PRICE\_OUTDATED(address token)                               | Thrown when the price is larger than the maximum delay                        | Oracle        |
| NO\_SYM\_MAPPING(address token)                              | Thrown when there is no                                                       | Oracle        |
| OUT\_OF\_DEVIATION\_CAP(uint256 deviation)                   | Thrown when the deviation is greater than the cap.                            | Oracle        |
| EXCEED\_SOURCE\_LENGTH(uint256 length)                       | Thrown when the source length is too long                                     | Oracle        |
| NO\_PRIMARY\_SOURCE(address token)                           | Thrown when there is no primary price feed for the token                      | Oracle        |
| NO\_VALID\_SOURCE(address token)                             | Thrown when the input for a token is not valid                                | Oracle        |
| EXCEED\_DEVIATION()                                          | Thrown when the amount of deviation is greater than the cap                   | Oracle        |
| TOW\_LOW\_MEAN(uint256 mean)                                 | Thrown when the mean is below the required                                    | Oracle        |
| NO\_MEAN(address token)                                      | Thrown when there is no mean price for a token                                | Oracle        |
| NO\_STABLEPOOL(address token)                                | Thrown when there is no stable pool for a token                               | Oracle        |
| PRICE\_FAILED(address token)                                 | Thrown when unable to get a price for a token                                 | Oracle        |
| LIQ\_THRESHOLD\_TOO\_HIGH(uint256 threshold)                 | Thrown when the input is too large for the liquidation threshold              | Oracle        |
| LIQ\_THRESHOLD\_TOO\_LOW(uint256 threshold)                  | Thrown when the input is too small for the liquidation threshold              | Oracle        |
| ORACLE\_NOT\_SUPPORT(address token)                          | Thrown when a token does not have oracle support                              | Oracle        |
| ORACLE\_NOT\_SUPPORT\_LP(address lp)                         | Thrown when a LP token does not have oracle support                           | Oracle        |
| ORACLE\_NOT\_SUPPORT\_WTOKEN(address wToken)                 | Thrown when a wtoken does not have oracle support                             | Oracle        |
| ERC1155\_NOT\_WHITELISTED(address collToken)                 | Thrown when an invalid ERC1155 is provided as input as it is not whitelisted  | Oracle        |
| NO\_ORACLE\_ROUTE(address token)                             | Thrown when the token does not have a set oracle routing                      | Oracle        |
| NOT\_BANK(address caller)                                    | Thrown when a caller is not the bank address                                  | Spell         |
| REFUND\_ETH\_FAILED(uint256 balance)                         | Thrown when unable to refund the balance in ETH                               | Spell         |
| NOT\_FROM\_WETH(address from)                                | Thrown when an invalid WETH address is provided                               | Spell         |
| LP\_NOT\_WHITELISTED(address lp)                             | Thrown when an invalid LP address is provided as input                        | Spell         |
| COLLATERAL\_NOT\_EXIST(uint256 strategyId, address colToken) | Thrown when an invalid Collateral token is provided as input for a strategy   | Spell         |
| STRATEGY\_NOT\_EXIST(address spell, uint256 strategyId)      | Thrown when attempting to enter a non-supported strategy                      | Spell         |
| EXCEED\_MAX\_POS\_SIZE(uint256 strategyId)                   | Thrown when attempting to make a position larger than cap                     | Spell         |
| EXCEED\_MAX\_LTV()                                           | Thrown when attempting to make a position larger than the supplied collateral | Spell         |
| INCORRECT\_LP(address lpToken)                               | Thrown when an invalid LP address is provided as input                        | Ichi Spell    |
| INCORRECT\_PID(uint256 pid)                                  | Thrown when an invalid pool ID is provided as input                           | Ichi Spell    |
| INCORRECT\_COLTOKEN(address colToken)                        | Thrown when the collateral token is not the appropriate one                   | Ichi Spell    |
| INCORRECT\_UNDERLUING(address uToken)                        | Thrown when the underlying token is not the appropriate one                   | Ichi Spell    |
| NOT\_FROM\_UNIV3(address sender)                             | Thrown when the sender address is not a Uniswap V3 address                    | Ichi Spell    |
| BORROW\_FAILED(uint256 amount)                               | Thrown when borrowing has failed                                              | Vault         |
| REPAY\_FAILED(uint256 amount)                                | Thrown when repaying debt has failed                                          | Vault         |
| LEND\_FAILED(uint256 amount)                                 | Thrown when lending has failed                                                | Vault         |
| REDEEM\_FAILED(uint256 amount)                               | Thrown when redeeming has failed                                              | Vault         |
| INVALID\_TOKEN\_ID(uint256 tokenId)                          | Thrown when an invalid token ID is provided as input                          | Wrapper       |
| BAD\_PID(uint256 pid)                                        | Thrown if supplied an invalid pool ID                                         | Wrapper       |
| BAD\_REWARD\_PER\_SHARE(uint256 rewardPerShare)              | Thrown if there is a mismatch in rewards per share of a vault                 | Wrapper       |
| FEE\_TOO\_HIGH(uint256 feeBps)                               | Thrown if supplied value is too large for feeBps                              | Bank          |
| NOT\_UNDER\_EXECUTION()                                      | Thrown if attempting use function during execution                            | Bank          |
| BANK\_NOT\_LISTED(address token)                             | Thrown if the supplied token address is not supported by that bank            | Bank          |
| BANK\_ALREADY\_LISTED()                                      | Thrown if the Bank address is already supported in the protocol               | Bank          |
| BANK\_LIMIT()                                                | Thrown if the amount of banks has reached its limit                           | Bank          |
| CTOKEN\_ALREADY\_ADDED()                                     | Thrown if the cToken is already supported in the protocol                     | Bank          |
| NOT\_EOA(address from)                                       | Thrown if the address is not an externally owned account (EOA)                | Bank          |
| LOCKED()                                                     | Thrown if the `_IN_EXEC_LOCK` variable is not equal to `_NOT_ENTERED`         | Bank          |
| NOT\_FROM\_SPELL(address from)                               | Thrown if the sender is not the spell address                                 | Bank          |
| NOT\_FROM\_OWNER(uint256 positionId, address sender)         | Thrown when the sender is not the owner of a position                         | Bank          |
| NOT\_IN\_EXEC()                                              | Thrown when the function is called outside of execution.                      | Bank          |
| ANOTHER\_COL\_EXIST(address collToken)                       | Thrown when the collToken already exists in the protocol                      | Bank          |
| NOT\_LIQUIDATABLE(uint256 positionID)                        | Thrown when a position is still healthy                                       | Bank          |
| BAD\_POSISTION(uint256 posId)                                | Thrown when the position Id provided is not supported                         | Bank          |
| BAD\_COLLATERAL(uint256 positionId)                          | Thrown when the supplied collateral address is not supported                  | Bank          |
| INSUFFICIENT\_COLLATERAL()                                   | Thrown when the collateral required is too small.                             | Bank          |
| SPELL\_NOT\_WHITELISTED(address spell)                       | Thrown when the Spell address is not whitelisted                              | Bank          |
| TOKEN\_NOT\_WHITELISTED(address token)                       | Thrown when the Token address is not whitelisted                              | Bank          |
| REPAY\_EXCEEDS\_DEBIT(uint256 repay, uint256 debt)           | Thrown when repay value is larger than debt value                             | Bank          |
| LEND\_NOT\_ALLOWED()                                         | Thrown when lending is turned off                                             | Bank          |
| BORROW\_NOT\_ALLOWED()                                       | Thrown when borrowing is turned off                                           | Bank          |
| INVALID\_UTOKEN(address uToken)                              | Thrown when the uToken provided is not approved                               | Bank          |
| INVALID\_FEE\_DISTRIBUTION()                                 | Thrown when the fee distribution is not set                                   | Config        |
| NO\_TREASURY\_SET()                                          | Thrown when there is no treasury set                                          | Config        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://v1.docs.blueberry.garden/earn/earn-error-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
