Enum jet_margin::ErrorCode
source · [−]#[repr(u32)]
pub enum ErrorCode {
Show 27 variants
NoAdapterResult,
WrongProgramAdapterResult,
UnauthorizedInvocation,
IndirectInvocation,
MaxPositions,
UnknownPosition,
CloseNonZeroPosition,
PositionAlreadyRegistered,
AccountNotEmpty,
PositionNotRegistered,
CloseRequiredPosition,
InvalidPositionOwner,
PositionNotRegisterable,
InvalidPositionAdapter,
OutdatedPrice,
InvalidPrice,
OutdatedBalance,
Unhealthy,
Healthy,
Liquidating,
NotLiquidating,
StalePositions,
UnauthorizedLiquidator,
LiquidationLostValue,
WrongAirspace,
InvalidConfig,
InvalidOracle,
}
Variants
NoAdapterResult
141000 - An adapter did not return anything
WrongProgramAdapterResult
141001
UnauthorizedInvocation
141002
IndirectInvocation
141003
MaxPositions
141010 - Account cannot record any additional positions
UnknownPosition
141011 - Account has no record of the position
CloseNonZeroPosition
141012 - Attempting to close a position that has a balance
PositionAlreadyRegistered
141013 - Attempting to re-register a position
AccountNotEmpty
141014 - Attempting to close a margin account that isn’t empty
PositionNotRegistered
141015 - Attempting to use a position not registered by the account
CloseRequiredPosition
141016 - Attempting to close a position that is required by the adapter
InvalidPositionOwner
141017
PositionNotRegisterable
141018
InvalidPositionAdapter
141020 - The adapter providing a position change is not authorized for this asset
OutdatedPrice
141021 - A position price is not up-to-date
InvalidPrice
141022 - An asset has an invalid price.
OutdatedBalance
141023 - A position balance is not up-to-date
Unhealthy
141030 - The account is not healthy
Healthy
141031 - The account is already healthy
Liquidating
141032 - The account is being liquidated
NotLiquidating
141033 - The account is not being liquidated
StalePositions
141034 - The account has stale positions
UnauthorizedLiquidator
141040 - No permission to perform a liquidation action
LiquidationLostValue
141041 - The liquidation attempted to extract too much value
WrongAirspace
141050 - The airspace does not match
InvalidConfig
141051 - Attempting to use or set configuration that is not valid
InvalidOracle
141051 - Attempting to use or set an oracle that is not valid