Skip to content
On this page

Errors ‚Äč

The TZIP-12 defines the set of standard errors to make it easier to integrate FA2 contracts with wallets, DApps and other generic software, and enable localization of user-visible error messages.

Each error code is a short-abbreviated string mnemonic. An FA2 contract client could use on-the-chain or off-the-chain registry to map the error code mnemonic to a user-readable, localized message.

A particular implementation of the FA2 contract MAY extend the standard set of errors with custom mnemonics for additional constraints.

Standard error mnemonics:

Error mnemonicDescription
"FA2_TOKEN_UNDEFINED"One of the specified token_ids is not defined within the FA2 contract
"FA2_INSUFFICIENT_BALANCE"A token owner does not have sufficient balance to transfer tokens from owner's account
"FA2_TX_DENIED"A transfer failed because of operator_transfer_policy == No_transfer
"FA2_NOT_OWNER"A transfer failed because operator_transfer_policy == Owner_transfer and it is invoked not by the token owner
"FA2_NOT_OPERATOR"A transfer failed because operator_transfer_policy == Owner_or_operator_transfer and it is invoked neither by the token owner nor a permitted operator
"FA2_OPERATORS_UNSUPPORTED"update_operators entrypoint is invoked and operator_transfer_policy is No_transfer or Owner_transfer

FA2 lib custom errors mnemonics:

Error mnemonicDescription
"FA2_NOT_ADMIN"The SENDER is not the administrator

If more than one error conditions are met, the entrypoint MAY fail with any applicable error.