pub enum LendingError {
Show 54 variants
InstructionUnpackError,
AlreadyInitialized,
NotRentExempt,
InvalidMarketAuthority,
InvalidMarketOwner,
InvalidAccountOwner,
InvalidTokenOwner,
InvalidTokenAccount,
InvalidTokenMint,
InvalidTokenProgram,
InvalidAmount,
InvalidConfig,
InvalidSigner,
InvalidAccountInput,
MathOverflow,
TokenInitializeMintFailed,
TokenInitializeAccountFailed,
TokenTransferFailed,
TokenMintToFailed,
TokenBurnFailed,
InsufficientLiquidity,
ReserveCollateralDisabled,
ReserveStale,
WithdrawTooSmall,
WithdrawTooLarge,
BorrowTooSmall,
BorrowTooLarge,
RepayTooSmall,
LiquidationTooSmall,
ObligationHealthy,
ObligationStale,
ObligationReserveLimit,
InvalidObligationOwner,
ObligationDepositsEmpty,
ObligationBorrowsEmpty,
ObligationDepositsZero,
ObligationBorrowsZero,
InvalidObligationCollateral,
InvalidObligationLiquidity,
ObligationCollateralEmpty,
ObligationLiquidityEmpty,
NegativeInterestRate,
InvalidOracleConfig,
InvalidFlashLoanReceiverProgram,
NotEnoughLiquidityAfterFlashLoan,
NullOracleConfig,
InsufficientProtocolFeesToRedeem,
FlashBorrowCpi,
NoFlashRepayFound,
InvalidFlashRepay,
FlashRepayCpi,
MultipleFlashBorrows,
FlashLoansDisabled,
DeprecatedInstruction,
}Expand description
Errors that may be returned by the TokenLending program.
Variants§
InstructionUnpackError
Invalid instruction data passed in.
AlreadyInitialized
The account cannot be initialized because it is already in use.
NotRentExempt
Lamport balance below rent-exempt threshold.
InvalidMarketAuthority
The program address provided doesn’t match the value generated by the program.
InvalidMarketOwner
Expected a different market owner
InvalidAccountOwner
The owner of the input isn’t set to the program address generated by the program.
InvalidTokenOwner
The owner of the account input isn’t set to the correct token program id.
InvalidTokenAccount
Expected an SPL Token account
InvalidTokenMint
Expected an SPL Token mint
InvalidTokenProgram
Expected a different SPL Token program
InvalidAmount
Invalid amount, must be greater than zero
InvalidConfig
Invalid config value
InvalidSigner
Invalid config value
InvalidAccountInput
Invalid account input
MathOverflow
Math operation overflow
TokenInitializeMintFailed
Token initialize mint failed
TokenInitializeAccountFailed
Token initialize account failed
TokenTransferFailed
Token transfer failed
TokenMintToFailed
Token mint to failed
TokenBurnFailed
Token burn failed
InsufficientLiquidity
Insufficient liquidity available
ReserveCollateralDisabled
This reserve’s collateral cannot be used for borrows
ReserveStale
Reserve state stale
WithdrawTooSmall
Withdraw amount too small
WithdrawTooLarge
Withdraw amount too large
BorrowTooSmall
Borrow amount too small
BorrowTooLarge
Borrow amount too large
RepayTooSmall
Repay amount too small
LiquidationTooSmall
Liquidation amount too small
ObligationHealthy
Cannot liquidate healthy obligations
ObligationStale
Obligation state stale
ObligationReserveLimit
Obligation reserve limit exceeded
InvalidObligationOwner
Expected a different obligation owner
ObligationDepositsEmpty
Obligation deposits are empty
ObligationBorrowsEmpty
Obligation borrows are empty
ObligationDepositsZero
Obligation deposits have zero value
ObligationBorrowsZero
Obligation borrows have zero value
InvalidObligationCollateral
Invalid obligation collateral
InvalidObligationLiquidity
Invalid obligation liquidity
ObligationCollateralEmpty
Obligation collateral is empty
ObligationLiquidityEmpty
Obligation liquidity is empty
NegativeInterestRate
Negative interest rate
InvalidOracleConfig
Oracle config is invalid
InvalidFlashLoanReceiverProgram
Expected a different flash loan receiver program
NotEnoughLiquidityAfterFlashLoan
Not enough liquidity after flash loan
NullOracleConfig
Null oracle config
InsufficientProtocolFeesToRedeem
Insufficent protocol fees to redeem or no liquidity availible to process redeem
FlashBorrowCpi
No cpi flash borrows allowed
NoFlashRepayFound
No corresponding repay found for flash borrow
InvalidFlashRepay
Invalid flash repay found for borrow
FlashRepayCpi
No cpi flash repays allowed
MultipleFlashBorrows
Multiple flash borrows not allowed in the same transaction
FlashLoansDisabled
Flash loans are disabled for this reserve
DeprecatedInstruction
Deprecated instruction
Trait Implementations§
Source§impl Clone for LendingError
impl Clone for LendingError
Source§fn clone(&self) -> LendingError
fn clone(&self) -> LendingError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LendingError
impl Debug for LendingError
Source§impl<T> DecodeError<T> for LendingError
impl<T> DecodeError<T> for LendingError
fn type_of() -> &'static str
fn decode_custom_error_to_enum(custom: u32) -> Option<E>where
E: FromPrimitive,
Source§impl Display for LendingError
impl Display for LendingError
Source§impl Error for LendingError
impl Error for LendingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<LendingError> for ProgramError
impl From<LendingError> for ProgramError
Source§fn from(e: LendingError) -> Self
fn from(e: LendingError) -> Self
Source§impl FromPrimitive for LendingError
impl FromPrimitive for LendingError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl PartialEq for LendingError
impl PartialEq for LendingError
Source§impl PrintProgramError for LendingError
impl PrintProgramError for LendingError
impl Eq for LendingError
impl StructuralPartialEq for LendingError
Auto Trait Implementations§
impl Freeze for LendingError
impl RefUnwindSafe for LendingError
impl Send for LendingError
impl Sync for LendingError
impl Unpin for LendingError
impl UnwindSafe for LendingError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more