FuelLabs/fuels-ts · warning · FuelError

UNSUPPORTED_FEATURE

UNSUPPORTED_FEATURE

Error message

The current node does not supports fetching asset details

What it means

Thrown by Provider.getAssetDetails when the connected node's advertised features do not include assetMetadata support, meaning the node version cannot serve the getAssetDetails query. The SDK checks getNodeFeatures() and, if assetMetadata is absent, refuses to call an operation the node does not implement. This is a node-version compatibility error, not a caller-value error.

Source

Thrown at packages/account/src/providers/provider.ts:1065

  async getBaseAssetId() {
    const all = await this.getChain();
    const {
      consensusParameters: { baseAssetId },
    } = all;
    return baseAssetId;
  }

  /**
   * Retrieves the details of an asset given its ID.
   *
   * @param assetId - The unique identifier of the asset.
   * @returns A promise that resolves to an object containing the asset details.
   */
  async getAssetDetails(assetId: string): Promise<GetAssetDetailsResponse | null> {
    const { assetMetadata } = await this.getNodeFeatures();

    if (!assetMetadata) {
      throw new FuelError(
        ErrorCode.UNSUPPORTED_FEATURE,
        'The current node does not supports fetching asset details'
      );
    }

    const { assetDetails } = await this.operations.getAssetDetails({ assetId });

    if (!assetDetails) {
      return null;
    }

    const { contractId, subId, totalSupply } = assetDetails ?? {};

    return {
      subId: subId ?? '',
      contractId: contractId ?? '',
      totalSupply: bn(totalSupply),
    };

View on GitHub (pinned to b3f37c91ac)

Solutions

  1. Upgrade fuel-core to a version that supports asset metadata and matches the SDK's compatibility matrix.
  2. Point the Provider at a node known to support getAssetDetails (check release notes).
  3. If you cannot upgrade, fetch asset info another way (e.g. contract read) and avoid getAssetDetails.
  4. Gate the call: check (await provider.getNodeFeatures()).assetMetadata before invoking getAssetDetails.

Example fix

// before
const details = await provider.getAssetDetails(assetId);

// after — guard on node capability
const features = await provider.getNodeFeatures();
if (!features.assetMetadata) {
  throw new Error('Connected node does not support asset details; upgrade fuel-core.');
}
const details = await provider.getAssetDetails(assetId);
Defensive patterns

Strategy: validation

Validate before calling

async function assertSupportsAssetDetails(provider) {
  const features = await provider.getNodeFeatures();
  if (!features.assetMetadata) {
    throw new Error('Connected node does not support asset details; upgrade fuel-core.');
  }
}

Type guard

async function nodeSupportsAssetDetails(provider): Promise<boolean> {
  const features = await provider.getNodeFeatures();
  return !!features.assetMetadata;
}

Try / catch

import { FuelError, ErrorCode } from '@fuel-ts/errors';
try {
  const details = await provider.getAssetDetails(assetId);
} catch (e) {
  if (e instanceof FuelError && e.code === ErrorCode.UNSUPPORTED_FEATURE) {
    // fall back to reading asset info from the contract directly
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling provider.getAssetDetails(assetId) against an older fuel-core node that does not expose asset metadata; connecting to a node whose features report omits assetMetadata; using a testnet/dev node running a down-level fuel-core.

Common situations: SDK version expects a node capability the connected node lacks; mainnet app pointed at a local older node; node not yet upgraded after an SDK bump that introduced getAssetDetails; custom/preview node builds that disable the feature.

Related errors


AI-assisted analysis of FuelLabs/fuels-ts@b3f37c91ac (2026-08-12). Data as JSON: /api/errors/192f8933714f4558. Report an issue: GitHub.