#[repr(u32)]
pub enum LendingError {
Show 48 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, NotEnoughLiquidityAfterFlashLoan, MethodNotAllowed, InvalidUpdatePseudoDepositOperation, UnauthorizedBorrowAuthorizer, InvalidPythPriceAccount,
}
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

NotEnoughLiquidityAfterFlashLoan

Not enough liquidity after flash loan

MethodNotAllowed

Used to prevent access to flashloan and liquidation

InvalidUpdatePseudoDepositOperation

Indicates the operation requested during a pseudo deposit update instruction is invalid

UnauthorizedBorrowAuthorizer

Indicates the account used to sign/authorize a borrow instruction is unauthorized

InvalidPythPriceAccount

Indicates the given pyth price account is incorrect

Implementations

Gets the name of this [#enum_name].

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.