Errors Codes
The full list of custom errors are displayed directly in the ErrorsLib of the Morpho contracts. For example, see the Morpho contract deployed on Ethereum mainnet.
Below is the list of the different Errors that can be thrown, along with their explanations:
Errors Message (returned data) | Error Natspec |
---|---|
"already set" | Thrown when the value is already set. |
"healthy position" | Thrown when the position to liquidate is healthy. |
"inconsistent input" | Thrown when not exactly one of the input amount is zero. |
"insufficient collateral" | Thrown when the collateral is insufficient to borrow or withdrawCollateral . |
"insufficient liquidity" | Thrown when the liquidity is insufficient to withdraw or borrow . |
"invalid nonce" | Thrown when the nonce is invalid. |
"invalid signature" | Thrown when the authorization signature is invalid. |
"irm not enabled" | Thrown when the IRM is not enabled at market creation. |
"lltv not enabled" | Thrown when the LLTV is not enabled at market creation. |
"market already created" | Thrown when the market is already created. |
"market not created" | Thrown when the market is not created. |
"max fee exceeded" | Thrown when the fee to set exceeds the maximum fee. |
"max lltv exceeded" | Thrown when the LLTV to enable exceeds the maximum LLTV. |
"max uint128 exceeded" | Thrown when the maximum uint128 is exceeded. |
"no code" | Thrown when a token to transfer doesn't have code. |
"not owner" | Thrown when the caller is not the owner. |
"signature expired" | Thrown when the authorization signature is expired. |
"transfer from reverted" | Thrown when a token transferFrom reverted. |
"transfer from returned false" | Thrown when a token transferFrom returned false. |
"transfer returned false" | Thrown when a token transfer returned false. |
"transfer reverted" | Thrown when a token transfer reverted. |
"unauthorized" | Thrown when the caller is not authorized to conduct an action. |
"zero address" | Thrown when a zero address is passed as input. |
"zero assets" | Thrown when zero assets is passed as input. |