Error Code
The ErrorCode
enum defines various error types that can occur within the iCoordinates protocol, providing meaningful messages to aid in debugging and handling exceptions. Below is a detailed explanation of each error code:
IllegalInput
:Explanation: This error is triggered when the provided input is not valid or suitable for the intended operation.
NotAdmin
:Explanation: This error occurs when the user attempting an action is not an admin and lacks the necessary permissions.
NotOwner
:Explanation: This error is raised when a user attempts an action that should only be performed by the owner.
NotEnoughFund
:Explanation: This error is triggered when an attempted fund withdrawal exceeds the available balance.
AccountInitiatedTooLate
:Explanation: This error is raised when an account is initiated after the lucky draw event has taken place.
NotInLuckyDrawRewardList
:Explanation: This error occurs when an account is not in the lucky draw reward list.
RewardTaken
:Explanation: This error indicates that the reward has already been taken.
AlreadyOnSale
:Explanation: This error is triggered when attempting to put coordinates on sale that are already listed.
NotOnSale
:Explanation: This error occurs when attempting to interact with coordinates that are not listed for sale.
NotIdle
:Explanation: This error is triggered when attempting to perform an action on coordinates that are not in an idle state.
NoTransferWhileOnSale
:Explanation: This error is raised when attempting a transfer while the coordinates are listed for sale.
EndtimeShouldBeInTheFuture
:Explanation: This error occurs if the specified endtime for an auction is not in the future.
NotOnAuction
:Explanation: This error occurs when attempting to perform an action that requires the coordinates to be on auction, but they are not.
AuctionWithBidsCannotBeCancelled
:Explanation: This error is triggered when attempting to cancel an auction that has received bids.
AuctionWithZeroBidCannotBeConfirmed
:Explanation: This error occurs when attempting to confirm an auction with zero bids on coordinates you own.
IsOwner
:Explanation: This error is raised when attempting an action that cannot be performed by the owner.
BidLowerThanPrevious
:Explanation: This error is triggered if a bid is not higher than the previous bid in an auction.
AuctionIsClosed
:Explanation: This error occurs when attempting to bid on a closed auction.
AuctionNotClosed
:Explanation: This error is raised when attempting to confirm an auction that has not yet ended.
WrongPreviousBidderAccount
Explanation: This error is triggered when the previous bidder's account does not match the expected account in an auction scenario.
Last updated