Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Reference — Contracts: Custom errors · Boson Protocol
Skip to content

Custom errors

When a Diamond call reverts, it carries a custom-error selector. The SDK's parseError() decodes it; here's the full list as a lookup.

Catalogue (181 errors)

ErrorParametersDefined in
AccessDenied()IBosonAccountHandler
AddressesAndCalldataLengthMismatch()IBosonAccountHandler
AdminOrAuthToken()IBosonAccountHandler
AgentAddressMustBeUnique()IBosonAccountHandler
AgentFeeAmountTooHigh()IBosonAccountHandler
AlreadyInitialized()IBosonAccountHandler
AmbiguousVoucherExpiry()IBosonAccountHandler
AmountExceedsRangeOrNothingToBurn()IBosonAccountHandler
ArrayLengthMismatch()IBosonAccountHandler
AuthTokenMustBeUnique()IBosonAccountHandler
BundleForTwinExists()IBosonAccountHandler
BundleOfferMustBeUnique()IBosonAccountHandler
BundleRequiresAtLeastOneTwinAndOneOffer()IBosonAccountHandler
BundleTwinMustBeUnique()IBosonAccountHandler
BuyerAddressMustBeUnique()IBosonAccountHandler
CannotCommit()IBosonAccountHandler
CannotRemoveDefaultRecipient()IBosonAccountHandler
ClerkDeprecated()IBosonAccountHandler
CloneCreationFailed()IBosonAccountHandler
DirectInitializationNotAllowed()IBosonAccountHandler
DisputeHasExpired()IBosonAccountHandler
DisputePeriodHasElapsed()IBosonAccountHandler
DisputePeriodNotElapsed()IBosonAccountHandler
DisputeResolverAddressMustBeUnique()IBosonAccountHandler
DisputeResolverFeeNotFound()IBosonAccountHandler
DisputeStillValid()IBosonAccountHandler
DRFeeMutualizerCannotProvideCoverage()IBosonAccountHandler
DRUnsupportedFee()IBosonAccountHandler
DuplicateDisputeResolverFees()IBosonAccountHandler
EscalationNotAllowed()IBosonAccountHandler
ExchangeAlreadyExists()IBosonAccountHandler
ExchangeForOfferExists()IBosonAccountHandler
ExchangeIdInReservedRange()IBosonAccountHandler
ExchangeIsNotInAFinalState()IBosonAccountHandler
ExternalCallFailed()IBosonAccountHandler
FeeAmountTooHigh()IBosonAccountHandler
FeeTableAssetNotSupported()IBosonAccountHandler
FunctionNotAllowlisted()IBosonAccountHandler
GroupHasCondition()IBosonAccountHandler
GroupHasNoCondition()IBosonAccountHandler
IncomingVoucherAlreadySet()IBosonAccountHandler
InexistentAllowedSellersList()IBosonAccountHandler
InexistentDisputeResolverFees()IBosonAccountHandler
InsufficientAvailableFunds()IBosonAccountHandler
InsufficientTwinSupplyToCoverBundleOffers()IBosonAccountHandler
InsufficientValueReceived()IBosonAccountHandler
InteractionNotAllowed()IBosonAccountHandler
InvalidAddress()IBosonAccountHandler
InvalidAgentFeePercentage()IBosonAccountHandler
InvalidAmount()IBosonAccountHandler
InvalidAmountToMint()IBosonAccountHandler
InvalidAuthTokenType()IBosonAccountHandler
InvalidBuyerOfferFields()IBosonAccountHandler
InvalidBuyerPercent()IBosonAccountHandler
InvalidCollectionIndex()IBosonAccountHandler
InvalidConditionParameters()IBosonAccountHandler
InvalidConduitAddress()IBosonAccountHandler
InvalidDisputePeriod()IBosonAccountHandler
InvalidDisputeResolver()IBosonAccountHandler
InvalidDisputeTimeout()IBosonAccountHandler
InvalidEscalationPeriod()IBosonAccountHandler
InvalidFeePercentage()IBosonAccountHandler
InvalidFunctionName()IBosonAccountHandler
InvalidOffer()IBosonAccountHandler
InvalidOfferCreator()IBosonAccountHandler
InvalidOfferPenalty()IBosonAccountHandler
InvalidOfferPeriod()IBosonAccountHandler
InvalidPriceDiscovery()IBosonAccountHandler
InvalidPriceDiscoveryPrice()IBosonAccountHandler
InvalidPriceType()IBosonAccountHandler
InvalidQuantityAvailable()IBosonAccountHandler
InvalidRangeLength()IBosonAccountHandler
InvalidRangeStart()IBosonAccountHandler
InvalidRedemptionPeriod()IBosonAccountHandler
InvalidResolutionPeriod()IBosonAccountHandler
InvalidRoyaltyFee()IBosonAccountHandler
InvalidRoyaltyInfo()IBosonAccountHandler
InvalidRoyaltyPercentage()IBosonAccountHandler
InvalidRoyaltyRecipient()IBosonAccountHandler
InvalidRoyaltyRecipientId()IBosonAccountHandler
InvalidSellerOfferFields()IBosonAccountHandler
InvalidSignature()IBosonAccountHandler
InvalidState()IBosonAccountHandler
InvalidSupplyAvailable()IBosonAccountHandler
InvalidTargeDisputeState()IBosonAccountHandler
InvalidTargeExchangeState()IBosonAccountHandler
InvalidToAddress()IBosonAccountHandler
InvalidTokenAddress()IBosonAccountHandler
InvalidTokenId()IBosonAccountHandler
InvalidTwinProperty()IBosonAccountHandler
InvalidTwinTokenRange()IBosonAccountHandler
MaxCommitsReached()IBosonAccountHandler
MustBeActive()IBosonAccountHandler
NativeNotAllowed()IBosonAccountHandler
NativeWrongAddress()IBosonAccountHandler
NativeWrongAmount()IBosonAccountHandler
NegativePriceNotAllowed()IBosonAccountHandler
NonAscendingOrder()IBosonAccountHandler
NonceUsedAlready()IBosonAccountHandler
NoPendingUpdateForAccount()IBosonAccountHandler
NoReservedRangeForOffer()IBosonAccountHandler
NoSilentMintAllowed()IBosonAccountHandler
NoSuchAgent()IBosonAccountHandler
NoSuchBundle()IBosonAccountHandler
NoSuchBuyer()IBosonAccountHandler
NoSuchCollection()IBosonAccountHandler
NoSuchDisputeResolver()IBosonAccountHandler
NoSuchEntity()IBosonAccountHandler
NoSuchExchange()IBosonAccountHandler
NoSuchGroup()IBosonAccountHandler
NoSuchOffer()IBosonAccountHandler
NoSuchSeller()IBosonAccountHandler
NoSuchTwin()IBosonAccountHandler
NotAdmin()IBosonAccountHandler
NotAdminAndAssistant()IBosonAccountHandler
NotAgentWallet()IBosonAccountHandler
NotAssistant()IBosonAccountHandler
NotAuthorized()IBosonAccountHandler
NotBuyerOrSeller()IBosonAccountHandler
NotBuyerWallet()IBosonAccountHandler
NotDisputeResolverAssistant()IBosonAccountHandler
NothingToWithdraw()IBosonAccountHandler
NothingUpdated()IBosonAccountHandler
NotOfferCreator()IBosonAccountHandler
NotPaused()IBosonAccountHandler
NoTransferApproved()IBosonAccountHandler
NotVoucherHolder()IBosonAccountHandler
NoUpdateApplied()IBosonAccountHandler
OfferExpiredOrVoided()IBosonAccountHandler
OfferHasBeenVoided()IBosonAccountHandler
OfferHasExpired()IBosonAccountHandler
OfferMustBeActive()IBosonAccountHandler
OfferMustBeUnique()IBosonAccountHandler
OfferNotAvailable()IBosonAccountHandler
OfferNotInBundle()IBosonAccountHandler
OfferNotInGroup()IBosonAccountHandler
OfferRangeAlreadyReserved()IBosonAccountHandler
OfferSoldOut()IBosonAccountHandler
OfferStillValid()IBosonAccountHandler
PriceDoesNotCoverPenalty()IBosonAccountHandler
PriceMismatch()IBosonAccountHandler
ProtocolInitializationFailed()IBosonAccountHandler
RecipientNotUnique()IBosonAccountHandler
ReentrancyGuard()IBosonAccountHandler
RegionPaused(uint8 region)IBosonAccountHandler
RoyaltyRecipientIdsNotSorted()IBosonAccountHandler
SameMutualizerAddress()IBosonAccountHandler
SellerAddressMustBeUnique()IBosonAccountHandler
SellerAlreadyApproved()IBosonAccountHandler
SellerNotApproved()IBosonAccountHandler
SellerParametersNotAllowed()IBosonAccountHandler
SellerSaltNotUnique()IBosonAccountHandler
SignatureValidationFailed()IBosonAccountHandler
TokenAmountMismatch()IBosonAccountHandler
TokenIdMandatory()IBosonAccountHandler
TokenIdMismatch()IBosonAccountHandler
TokenIdNotInConditionRange()IBosonAccountHandler
TokenIdNotSet()IBosonAccountHandler
TokenTransferFailed()IBosonAccountHandler
TotalFeeExceedsLimit()IBosonAccountHandler
TwinNotInBundle()IBosonAccountHandler
TwinsAlreadyExist()IBosonAccountHandler
TwinTransferUnsuccessful()IBosonAccountHandler
UnauthorizedCallerUpdate()IBosonAccountHandler
UnexpectedDataReturned(bytes data)IBosonAccountHandler
UnexpectedERC721Received()IBosonAccountHandler
UnsupportedMutualizer()IBosonAccountHandler
UnsupportedToken()IBosonAccountHandler
ValueZeroNotAllowed()IBosonAccountHandler
VersionMustBeSet()IBosonAccountHandler
VoucherExtensionNotValid()IBosonAccountHandler
VoucherHasExpired()IBosonAccountHandler
VoucherNotReceived()IBosonAccountHandler
VoucherNotRedeemable()IBosonAccountHandler
VoucherNotTransferred()IBosonAccountHandler
VoucherStillValid()IBosonAccountHandler
VoucherTransferNotAllowed()IBosonAccountHandler
WalletOwnsVouchers()IBosonAccountHandler
WrongCurrentVersion()IBosonAccountHandler
WrongDefaultRecipient()IBosonAccountHandler
ZeroDepositNotAllowed()IBosonAccountHandler

How to decode

import offerAbi from "@bosonprotocol/common/dist/cjs/abis/IBosonOfferHandler.json"
import exchangeAbi from "@bosonprotocol/common/dist/cjs/abis/IBosonExchangeHandler.json"
import disputeAbi from "@bosonprotocol/common/dist/cjs/abis/IBosonDisputeHandler.json"
import fundsAbi from "@bosonprotocol/common/dist/cjs/abis/IBosonFundsHandler.json"
import priceAbi from "@bosonprotocol/common/dist/cjs/abis/IBosonPriceDiscoveryHandler.json"
import { ethers } from "ethers"
 
const iface = new ethers.utils.Interface([...offerAbi, ...exchangeAbi, ...disputeAbi, ...fundsAbi, ...priceAbi])
try {
  iface.parseError(err.data ?? err.error?.data)
} catch { /* not a known custom error */ }

Or higher-level:

const parsed = sdk.parseError(err)
// → { code: "OfferVoided", args: { offerId: "123" } }

Source

Related