Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

Icon LinkErrors

All errors thrown from the SDK are instances of the FuelError class which will have an accompanying ErrorCode.

Icon LinkError Codes

Here is a list of the expected error codes the SDK can throw. These error codes are used to help understand the error that has been thrown with potential resolutions.

Icon LinkABI_MAIN_METHOD_MISSING

When your ABI does not have a main method.

This can be resolved by adding a main method to your ABI. This is prevalent in scripts and predicates that must contain a main method.

Icon LinkABI_TYPES_AND_VALUES_MISMATCH

When the arguments supplied to the function do not match the minimum required input length.

Check that the arguments supplied to the function match the required type.

Icon LinkACCOUNT_REQUIRED

When an Account is required for an operation. This will usually be in the form of a Wallet .

It could be caused during the deployments of contracts when an account is required to sign the transaction. This can be resolved by following the deployment guide here .

Icon LinkCONFIG_FILE_NOT_FOUND

When a configuration file is not found. This could either be a fuels.config.[ts,js,mjs,cjs] file or a TOML file.

Ensure that the configuration file is present in the root directory of your project.

Icon LinkCONFIG_FILE_ALREADY_EXISTS

When a configuration file already exists in the root directory of your project.

You can not run fuels init more than once for a given project. Either remove the existing configuration file or update it.

Icon LinkCONVERTING_FAILED

When converting a big number into an incompatible format.

Ensure that the value you've supplied to the big number is compatible with the value you are converting to.

Icon LinkCONTRACT_SIZE_EXCEEDS_LIMIT

When the contract size exceeds the maximum contract size limit.

Ensure that the contract size is less than the maximum contract size limit, of 100 KB. This can be validated by checking the bytecode length of the contract.

Icon LinkDUPLICATED_POLICY

When there are more than policies with the same type, for a transaction.

Ensure that there are no duplicate (by type) policies for a transaction.

Icon LinkERROR_BUILDING_BLOCK_EXPLORER_URL

When more than one of the following options is passed: path, address, txId, blockNumber.

Check that only one of the above is passed.

Icon LinkFUNCTION_NOT_FOUND

When the function with the given name, signature or selector is not found in the ABI.

Check that the function name, signature or selector is correct and exits on the ABI.

Icon LinkFUNDS_TOO_LOW

When the funds in the account are lower than the required amount.

Ensure that the account has enough funds to cover the transaction.

Icon LinkGAS_LIMIT_TOO_LOW

When the gas limit is lower than the minimum gas limit.

Increase the gas limit to be greater than the minimum gas limit.

Icon LinkGAS_PRICE_TOO_LOW

When the gas price is lower than the minimum gas price.

Increase the gas price to be greater than the minimum gas price.

Icon LinkHD_WALLET_ERROR

A hardware wallet will throw for unsupported configurations.

The error message will determine which element of the configuration is incorrect. It could be due to the public or private key or when configuring to/from an extended key.

Icon LinkINVALID_CHECKSUM

Checksum validation failed for the provided mnemonic.

Ensure that the mnemonic is correct.

Icon LinkINVALID_CHUNK_SIZE_MULTIPLIER

When the chunk size multiplier is not between 0 and 1.

Ensure that the chunk size multiplier is a number that it is between 0 and 1.

Icon LinkINVALID_CONFIGURABLE_CONSTANTS

When the program type either: does not have configurable constants to be set; or the provided configurable constant does not belong to the program type, as defined by its ABI.

Ensure the configurable constants provided are correct and are defined in ABI.

Icon LinkINVALID_COMPONENT

When an expected component is not found in the ABI or is malformed.

Ensure that you have correctly formed Sway types for Arrays and Vectors .

Icon LinkINVALID_CREDENTIALS

When the password provided is incorrect.

Ensure that the password is correct.

Icon LinkINVALID_DATA

When the value being passed is not considered valid, as defined by the function.

Check the function signature and ensure that the passed value is valid.

Icon LinkINVALID_ENTROPY

When the entropy is not: between 16 and 32 bytes; a multiple of 4.

Ensure that the entropy is between 16 and 32 bytes and a multiple of 4.

Icon LinkINVALID_EVM_ADDRESS

When the provided EVM address is invalid.

Ensure that the EVM address is valid.

Icon LinkINVALID_INPUT_PARAMETERS

When the provided input parameters are not valid.

The error message will determine which parameter is missing. It could be that the provided program type is not one of the following contract, script, or predicate.

Icon LinkINVALID_MNEMONIC

When the supplied mnemonic is invalid.

Check the message for more details. It could be that the mnemonic phrase word length is not one of the following: 12, 15, 18, 21, or 24 lengths.

Icon LinkINVALID_PASSWORD

When the provided password is incorrect.

Ensure that the password is correct.

Icon LinkINVALID_POLICY_TYPE

When the supplied policy type is invalid for the given Script.

Check the policy type is defined in PolicyType.

Icon LinkINVALID_PROVIDER

When unable to connect to the Provider or Network supplied to a method on the Fuel class.

Check that the Provider or Network is supplied correctly.

Icon LinkINVALID_PUBLIC_KEY

When the provided public key is invalid.

Ensure that the public key is valid.

Icon LinkINVALID_RECEIPT_TYPE

When the receipt type is invalid.

Check the type is within ReceiptType.

Icon LinkINVALID_REQUEST

When the request to the Fuel node fails, error messages are propagated from the Fuel node.

Check the error message from the Fuel node.

Icon LinkINVALID_SEED

When the seed length is not between 16 and 64 bytes.

Ensure that the seed length is between 16 and 64 bytes.

Icon LinkINVALID_TRANSACTION_INPUT

When the input type is invalid.

Check the type is within InputType.

Icon LinkINVALID_TRANSACTION_OUTPUT

When the output type is invalid.

Check the type is within OutputType.

Icon LinkINVALID_TRANSACTION_STATUS

When the transaction status received from the node is unexpected.

Check the status received is within TransactionStatus.

Icon LinkUNSUPPORTED_TRANSACTION_TYPE

When the transaction type from the Fuel Node is not supported.

The type is within TransactionType .

Icon LinkINVALID_TTL

When the TTL is less than or equal to zero.

Ensure that the TTL is a number and that the TTL is greater than zero.

Icon LinkINVALID_WORD_LIST

When the word list length is not equal to 2048.

The word list provided to the mnemonic length should be equal to 2048.

Icon LinkJSON_ABI_ERROR

When an ABI type does not conform to the correct format.

It is usually caused by an incorrect type/s within your program, check our type docs here for information on the types we support and their expected format.

Icon LinkLOG_TYPE_NOT_FOUND

When the log type ID supplied can not be found in the ABI.

Check that the log type ID is correct and exists in the ABI.

Icon LinkMISSING_CONNECTOR

A connector is missing when it's required for a given operation.

Ensure that a connector has been supplied to the Account or Wallet.

Icon LinkMISSING_PROVIDER

A provider is missing when it's required for a given operation.

It could be caused by the provider not being set for either an Account or a Wallet - use the connect method to attach a provider.

Icon LinkMISSING_REQUIRED_PARAMETER

When a required parameter has not been supplied to a given method.

The error message will determine which parameter is missing. This could be caused during type generation when neither inputs nor filepaths are supplied (at least one is required).

Icon LinkNODE_INFO_CACHE_EMPTY

When the Fuel Node info cache is empty; This is usually caused by not being connected to the Fuel Node.

Ensure that the provider has connected to a Fuel Node successfully.

Icon LinkTIMEOUT_EXCEEDED

When the timeout has been exceeded for a given operation.

Check that you're connected to the network and that the network is stable.

Icon LinkTYPE_NOT_FOUND

When the type with the given type ID is not found in the ABI.

Check that the type ID is correct and exists in the ABI.

Icon LinkTYPE_NOT_SUPPORTED

When an unexpected type has been detected - the error message will determine which type is incorrect.

Check the type against your ABI and ensure that it is correct. You can find a list of all our types here .

Icon LinkUNSUPPORTED_FUEL_CLIENT_VERSION

When the version of the Fuel Node you are targeting is not supported by the client you are accessing it from.

Check the version of the Fuel Node and use a compatible version of the SDK to target it.

Icon LinkWALLET_MANAGER_ERROR

A wallet manager will throw for a multitude of reasons. The error message will determine which element of the configuration is incorrect.

It could be that the passphrase is incorrect and/or the wallet does not exist in the manager.

Icon LinkWORKSPACE_NOT_DETECTED

When the workspace is not detected in the directory indicated in the message.

Ensure that the workspace is present in the directory specified.

Icon LinkHASHER_LOCKED

The hashing algorithm is currently locked, any subsequent attempts to register a new implementation will throw this error. The purpose of the lock function is to provide a way to ensure that the implementation of the specific hashing algorithm cannot be changed once it is locked. This can be useful in scenarios where you want to guarantee the integrity and consistency of the hashing function throughout your application.

Icon LinkUNKNOWN

In cases where the error hasn't been mapped yet, this code will be used.

If you believe you found a bug, please report the issue Icon Link to the team.

Icon LinkMAX_INPUTS_EXCEEDED

When the number of transaction inputs exceeds the maximum limit allowed by the blockchain.

Icon LinkMAX_OUTPUTS_EXCEEDED

When the number of transaction outputs exceeds the maximum limit allowed by the blockchain.