#[repr(u32)]pub enum LendingError {
Show 185 variants
InvalidMarketAuthority = 6_000,
InvalidMarketOwner = 6_001,
InvalidAccountOwner = 6_002,
InvalidAmount = 6_003,
InvalidConfig = 6_004,
InvalidSigner = 6_005,
InvalidAccountInput = 6_006,
MathOverflow = 6_007,
InsufficientLiquidity = 6_008,
ReserveStale = 6_009,
WithdrawTooSmall = 6_010,
WithdrawTooLarge = 6_011,
BorrowTooSmall = 6_012,
BorrowTooLarge = 6_013,
RepayTooSmall = 6_014,
LiquidationTooSmall = 6_015,
ObligationHealthy = 6_016,
ObligationStale = 6_017,
ObligationReserveLimit = 6_018,
InvalidObligationOwner = 6_019,
ObligationDepositsEmpty = 6_020,
ObligationBorrowsEmpty = 6_021,
ObligationDepositsZero = 6_022,
ObligationBorrowsZero = 6_023,
InvalidObligationCollateral = 6_024,
InvalidObligationLiquidity = 6_025,
ObligationCollateralEmpty = 6_026,
ObligationLiquidityEmpty = 6_027,
NegativeInterestRate = 6_028,
InvalidOracleConfig = 6_029,
InsufficientProtocolFeesToRedeem = 6_030,
FlashBorrowCpi = 6_031,
NoFlashRepayFound = 6_032,
InvalidFlashRepay = 6_033,
FlashRepayCpi = 6_034,
MultipleFlashBorrows = 6_035,
FlashLoansDisabled = 6_036,
SwitchboardV2Error = 6_037,
CouldNotDeserializeScope = 6_038,
PriceTooOld = 6_039,
PriceTooDivergentFromTwap = 6_040,
InvalidTwapPrice = 6_041,
GlobalEmergencyMode = 6_042,
InvalidFlag = 6_043,
PriceNotValid = 6_044,
PriceIsBiggerThanHeuristic = 6_045,
PriceIsLowerThanHeuristic = 6_046,
PriceIsZero = 6_047,
PriceConfidenceTooWide = 6_048,
IntegerOverflow = 6_049,
NoFarmForReserve = 6_050,
IncorrectInstructionInPosition = 6_051,
NoPriceFound = 6_052,
InvalidTwapConfig = 6_053,
InvalidPythPriceAccount = 6_054,
InvalidSwitchboardAccount = 6_055,
InvalidScopePriceAccount = 6_056,
ObligationCollateralLtvZero = 6_057,
InvalidObligationSeedsValue = 6_058,
DeprecatedInvalidObligationId = 6_059,
InvalidBorrowRateCurvePoint = 6_060,
InvalidUtilizationRate = 6_061,
CannotSocializeObligationWithCollateral = 6_062,
ObligationEmpty = 6_063,
WithdrawalCapReached = 6_064,
LastTimestampGreaterThanCurrent = 6_065,
LiquidationRewardTooSmall = 6_066,
IsolatedAssetTierViolation = 6_067,
InconsistentElevationGroup = 6_068,
InvalidElevationGroup = 6_069,
InvalidElevationGroupConfig = 6_070,
UnhealthyElevationGroupLtv = 6_071,
ElevationGroupNewLoansDisabled = 6_072,
ReserveDeprecated = 6_073,
ReferrerAccountNotInitialized = 6_074,
ReferrerAccountMintMissmatch = 6_075,
ReferrerAccountWrongAddress = 6_076,
ReferrerAccountReferrerMissmatch = 6_077,
ReferrerAccountMissing = 6_078,
InsufficientReferralFeesToRedeem = 6_079,
CpiDisabled = 6_080,
ShortUrlNotAsciiAlphanumeric = 6_081,
ReserveObsolete = 6_082,
ElevationGroupAlreadyActivated = 6_083,
ObligationInObsoleteReserve = 6_084,
ReferrerStateOwnerMismatch = 6_085,
UserMetadataOwnerAlreadySet = 6_086,
CollateralNonLiquidatable = 6_087,
BorrowingDisabled = 6_088,
BorrowLimitExceeded = 6_089,
DepositLimitExceeded = 6_090,
BorrowingDisabledOutsideElevationGroup = 6_091,
NetValueRemainingTooSmall = 6_092,
WorseLtvBlocked = 6_093,
LiabilitiesBiggerThanAssets = 6_094,
ReserveTokenBalanceMismatch = 6_095,
ReserveVaultBalanceMismatch = 6_096,
ReserveAccountingMismatch = 6_097,
BorrowingAboveUtilizationRateDisabled = 6_098,
LiquidationBorrowFactorPriority = 6_099,
LiquidationLowestLiquidationLtvPriority = 6_100,
ElevationGroupBorrowLimitExceeded = 6_101,
ElevationGroupWithoutDebtReserve = 6_102,
ElevationGroupMaxCollateralReserveZero = 6_103,
ElevationGroupHasAnotherDebtReserve = 6_104,
ElevationGroupDebtReserveAsCollateral = 6_105,
ObligationCollateralExceedsElevationGroupLimit = 6_106,
ObligationElevationGroupMultipleDebtReserve = 6_107,
UnsupportedTokenExtension = 6_108,
InvalidTokenAccount = 6_109,
DepositDisabledOutsideElevationGroup = 6_110,
CannotCalculateReferralAmountDueToSlotsMismatch = 6_111,
ObligationOwnersMustMatch = 6_112,
ObligationsMustMatch = 6_113,
LendingMarketsMustMatch = 6_114,
ObligationCurrentlyMarkedForDeleveraging = 6_115,
MaximumWithdrawValueZero = 6_116,
ZeroMaxLtvAssetsInDeposits = 6_117,
LowestLtvAssetsPriority = 6_118,
WorseLtvThanUnhealthyLtv = 6_119,
FarmAccountsMissing = 6_120,
RepayTooSmallForFullLiquidation = 6_121,
InsufficientRepayAmount = 6_122,
OrderIndexOutOfBounds = 6_123,
InvalidOrderConfiguration = 6_124,
OrderConfigurationNotSupportedByObligation = 6_125,
OperationNotPermittedWithCurrentObligationOrders = 6_126,
OperationNotPermittedMarketImmutable = 6_127,
OrderCreationDisabled = 6_128,
NoUpgradeAuthority = 6_129,
InitialAdminDepositExecuted = 6_130,
ReserveHasNotReceivedInitialDeposit = 6_131,
CTokenUsageBlocked = 6_132,
CannotUseSameReserve = 6_133,
TransactionIncludesRestrictedPrograms = 6_134,
BorrowOrderDebtLiquidityMintMismatch = 6_135,
BorrowOrderMaxBorrowRateExceeded = 6_136,
BorrowOrderMinDebtTermInsufficient = 6_137,
BorrowOrderFillTimeLimitExceeded = 6_138,
ReserveDebtMaturityReached = 6_139,
NonUpdatableOrderConfiguration = 6_140,
BorrowOrderExecutionDisabled = 6_141,
DebtReachedReserveDebtTerm = 6_142,
ExpectationNotMet = 6_143,
BorrowOrderFillValueTooSmall = 6_144,
WithdrawTicketIssuanceDisabled = 6_145,
WithdrawTicketRedemptionDisabled = 6_146,
WithdrawTicketStillValid = 6_147,
WithdrawTicketRequiresFullRedemption = 6_148,
UserTokenBalanceMismatch = 6_149,
WithdrawQueuedLiquidityValueTooSmall = 6_150,
InvalidTokenAccountState = 6_151,
WithdrawTicketInvalid = 6_152,
BorrowOrderValueTooSmall = 6_153,
WithdrawTicketValueTooSmall = 6_154,
InvalidWithdrawTicketProgressCallbackConfig = 6_155,
WithdrawTicketProgressCallbackAccountsMissing = 6_156,
BorrowRolloverConfigurationDisabled = 6_157,
InvalidObligationConfigUpdateSubject = 6_158,
BorrowRolloverLiquidityMintMismatch = 6_159,
ObligationBorrowRolloverNotApplicable = 6_160,
ObligationBorrowOutsideRolloverWindow = 6_161,
ObligationBorrowRolloverNotEnabledByOwner = 6_162,
ObligationBorrowRolloverTargetReserveMismatch = 6_163,
BorrowRolloverExecutionDisabled = 6_164,
ObligationAccountingMismatch = 6_165,
PartialRolloverValueTooSmall = 6_166,
ObligationBorrowRolloverConfigMismatch = 6_167,
ObligationBorrowRolloverMustProlongDebtTerm = 6_168,
RolloverNotSupportedInElevationGroup = 6_169,
WithdrawTicketCancellationDisabled = 6_170,
WithdrawTicketFullyCancelled = 6_171,
CloneSourceReserveDisabled = 6_172,
CloneTargetReserveAlreadyInUse = 6_173,
ClonedReserveLiquidityMintMismatch = 6_174,
ReserveEmergencyMode = 6_175,
ObligationOwnershipTransferInProgress = 6_176,
ObligationOwnershipTransferNotInInitiatedState = 6_177,
ObligationPendingOwnerNotSet = 6_178,
ObligationInvalidPendingOwner = 6_179,
ObligationOwnershipTransferNotApproved = 6_180,
ObligationHasActiveBorrowOrders = 6_181,
OnlyComputeBudgetCompanionIxsAllowed = 6_182,
MissingPermissioner = 6_183,
ReserveRewardsDisabled = 6_184,
}Variants§
InvalidMarketAuthority = 6_000
InvalidMarketOwner = 6_001
InvalidAccountOwner = 6_002
InvalidAmount = 6_003
InvalidConfig = 6_004
InvalidSigner = 6_005
InvalidAccountInput = 6_006
MathOverflow = 6_007
InsufficientLiquidity = 6_008
ReserveStale = 6_009
WithdrawTooSmall = 6_010
WithdrawTooLarge = 6_011
BorrowTooSmall = 6_012
BorrowTooLarge = 6_013
RepayTooSmall = 6_014
LiquidationTooSmall = 6_015
ObligationHealthy = 6_016
ObligationStale = 6_017
ObligationReserveLimit = 6_018
InvalidObligationOwner = 6_019
ObligationDepositsEmpty = 6_020
ObligationBorrowsEmpty = 6_021
ObligationDepositsZero = 6_022
ObligationBorrowsZero = 6_023
InvalidObligationCollateral = 6_024
InvalidObligationLiquidity = 6_025
ObligationCollateralEmpty = 6_026
ObligationLiquidityEmpty = 6_027
NegativeInterestRate = 6_028
InvalidOracleConfig = 6_029
InsufficientProtocolFeesToRedeem = 6_030
FlashBorrowCpi = 6_031
NoFlashRepayFound = 6_032
InvalidFlashRepay = 6_033
FlashRepayCpi = 6_034
MultipleFlashBorrows = 6_035
FlashLoansDisabled = 6_036
SwitchboardV2Error = 6_037
CouldNotDeserializeScope = 6_038
PriceTooOld = 6_039
PriceTooDivergentFromTwap = 6_040
InvalidTwapPrice = 6_041
GlobalEmergencyMode = 6_042
InvalidFlag = 6_043
PriceNotValid = 6_044
PriceIsBiggerThanHeuristic = 6_045
PriceIsLowerThanHeuristic = 6_046
PriceIsZero = 6_047
PriceConfidenceTooWide = 6_048
IntegerOverflow = 6_049
NoFarmForReserve = 6_050
IncorrectInstructionInPosition = 6_051
NoPriceFound = 6_052
InvalidTwapConfig = 6_053
InvalidPythPriceAccount = 6_054
InvalidSwitchboardAccount = 6_055
InvalidScopePriceAccount = 6_056
ObligationCollateralLtvZero = 6_057
InvalidObligationSeedsValue = 6_058
DeprecatedInvalidObligationId = 6_059
InvalidBorrowRateCurvePoint = 6_060
InvalidUtilizationRate = 6_061
CannotSocializeObligationWithCollateral = 6_062
ObligationEmpty = 6_063
WithdrawalCapReached = 6_064
LastTimestampGreaterThanCurrent = 6_065
LiquidationRewardTooSmall = 6_066
IsolatedAssetTierViolation = 6_067
InconsistentElevationGroup = 6_068
InvalidElevationGroup = 6_069
InvalidElevationGroupConfig = 6_070
UnhealthyElevationGroupLtv = 6_071
ElevationGroupNewLoansDisabled = 6_072
ReserveDeprecated = 6_073
ReferrerAccountNotInitialized = 6_074
ReferrerAccountMintMissmatch = 6_075
ReferrerAccountWrongAddress = 6_076
ReferrerAccountReferrerMissmatch = 6_077
ReferrerAccountMissing = 6_078
InsufficientReferralFeesToRedeem = 6_079
CpiDisabled = 6_080
ShortUrlNotAsciiAlphanumeric = 6_081
ReserveObsolete = 6_082
ElevationGroupAlreadyActivated = 6_083
ObligationInObsoleteReserve = 6_084
ReferrerStateOwnerMismatch = 6_085
UserMetadataOwnerAlreadySet = 6_086
CollateralNonLiquidatable = 6_087
BorrowingDisabled = 6_088
BorrowLimitExceeded = 6_089
DepositLimitExceeded = 6_090
BorrowingDisabledOutsideElevationGroup = 6_091
NetValueRemainingTooSmall = 6_092
WorseLtvBlocked = 6_093
LiabilitiesBiggerThanAssets = 6_094
ReserveTokenBalanceMismatch = 6_095
ReserveVaultBalanceMismatch = 6_096
ReserveAccountingMismatch = 6_097
BorrowingAboveUtilizationRateDisabled = 6_098
LiquidationBorrowFactorPriority = 6_099
LiquidationLowestLiquidationLtvPriority = 6_100
ElevationGroupBorrowLimitExceeded = 6_101
ElevationGroupWithoutDebtReserve = 6_102
ElevationGroupMaxCollateralReserveZero = 6_103
ElevationGroupHasAnotherDebtReserve = 6_104
ElevationGroupDebtReserveAsCollateral = 6_105
ObligationCollateralExceedsElevationGroupLimit = 6_106
ObligationElevationGroupMultipleDebtReserve = 6_107
UnsupportedTokenExtension = 6_108
InvalidTokenAccount = 6_109
DepositDisabledOutsideElevationGroup = 6_110
CannotCalculateReferralAmountDueToSlotsMismatch = 6_111
ObligationOwnersMustMatch = 6_112
ObligationsMustMatch = 6_113
LendingMarketsMustMatch = 6_114
ObligationCurrentlyMarkedForDeleveraging = 6_115
MaximumWithdrawValueZero = 6_116
ZeroMaxLtvAssetsInDeposits = 6_117
LowestLtvAssetsPriority = 6_118
WorseLtvThanUnhealthyLtv = 6_119
FarmAccountsMissing = 6_120
RepayTooSmallForFullLiquidation = 6_121
InsufficientRepayAmount = 6_122
OrderIndexOutOfBounds = 6_123
InvalidOrderConfiguration = 6_124
OrderConfigurationNotSupportedByObligation = 6_125
OperationNotPermittedWithCurrentObligationOrders = 6_126
OperationNotPermittedMarketImmutable = 6_127
OrderCreationDisabled = 6_128
NoUpgradeAuthority = 6_129
InitialAdminDepositExecuted = 6_130
ReserveHasNotReceivedInitialDeposit = 6_131
CTokenUsageBlocked = 6_132
CannotUseSameReserve = 6_133
TransactionIncludesRestrictedPrograms = 6_134
BorrowOrderDebtLiquidityMintMismatch = 6_135
BorrowOrderMaxBorrowRateExceeded = 6_136
BorrowOrderMinDebtTermInsufficient = 6_137
BorrowOrderFillTimeLimitExceeded = 6_138
ReserveDebtMaturityReached = 6_139
NonUpdatableOrderConfiguration = 6_140
BorrowOrderExecutionDisabled = 6_141
DebtReachedReserveDebtTerm = 6_142
ExpectationNotMet = 6_143
BorrowOrderFillValueTooSmall = 6_144
WithdrawTicketIssuanceDisabled = 6_145
WithdrawTicketRedemptionDisabled = 6_146
WithdrawTicketStillValid = 6_147
WithdrawTicketRequiresFullRedemption = 6_148
UserTokenBalanceMismatch = 6_149
WithdrawQueuedLiquidityValueTooSmall = 6_150
InvalidTokenAccountState = 6_151
WithdrawTicketInvalid = 6_152
BorrowOrderValueTooSmall = 6_153
WithdrawTicketValueTooSmall = 6_154
InvalidWithdrawTicketProgressCallbackConfig = 6_155
WithdrawTicketProgressCallbackAccountsMissing = 6_156
BorrowRolloverConfigurationDisabled = 6_157
InvalidObligationConfigUpdateSubject = 6_158
BorrowRolloverLiquidityMintMismatch = 6_159
ObligationBorrowRolloverNotApplicable = 6_160
ObligationBorrowOutsideRolloverWindow = 6_161
ObligationBorrowRolloverNotEnabledByOwner = 6_162
ObligationBorrowRolloverTargetReserveMismatch = 6_163
BorrowRolloverExecutionDisabled = 6_164
ObligationAccountingMismatch = 6_165
PartialRolloverValueTooSmall = 6_166
ObligationBorrowRolloverConfigMismatch = 6_167
ObligationBorrowRolloverMustProlongDebtTerm = 6_168
RolloverNotSupportedInElevationGroup = 6_169
WithdrawTicketCancellationDisabled = 6_170
WithdrawTicketFullyCancelled = 6_171
CloneSourceReserveDisabled = 6_172
CloneTargetReserveAlreadyInUse = 6_173
ClonedReserveLiquidityMintMismatch = 6_174
ReserveEmergencyMode = 6_175
ObligationOwnershipTransferInProgress = 6_176
ObligationOwnershipTransferNotInInitiatedState = 6_177
ObligationPendingOwnerNotSet = 6_178
ObligationInvalidPendingOwner = 6_179
ObligationOwnershipTransferNotApproved = 6_180
ObligationHasActiveBorrowOrders = 6_181
OnlyComputeBudgetCompanionIxsAllowed = 6_182
MissingPermissioner = 6_183
ReserveRewardsDisabled = 6_184
Implementations§
Source§impl LendingError
impl LendingError
Sourcepub const fn error_code(self) -> u32
pub const fn error_code(self) -> u32
Returns the Anchor error code for this variant (6000 + offset).
Sourcepub const fn from_error_code(code: u32) -> Option<Self>
pub const fn from_error_code(code: u32) -> Option<Self>
Converts an Anchor error code to a LendingError, if it matches a known variant.
Trait Implementations§
Source§impl Clone for LendingError
impl Clone for LendingError
Source§fn clone(&self) -> LendingError
fn clone(&self) -> LendingError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LendingError
Source§impl Debug for LendingError
impl Debug for LendingError
Source§impl Display for LendingError
impl Display for LendingError
impl Eq 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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl Hash for LendingError
impl Hash for LendingError
Source§impl PartialEq for LendingError
impl PartialEq for LendingError
Source§fn eq(&self, other: &LendingError) -> bool
fn eq(&self, other: &LendingError) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.