{"record":{"id":"192f8933714f4558","repo":"FuelLabs/fuels-ts","slug":"unsupported-feature","errorCode":"UNSUPPORTED_FEATURE","errorMessage":"The current node does not supports fetching asset details","messagePattern":"The current node does not supports fetching asset details","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"warning","filePath":"packages/account/src/providers/provider.ts","lineNumber":1065,"sourceCode":"  async getBaseAssetId() {\n    const all = await this.getChain();\n    const {\n      consensusParameters: { baseAssetId },\n    } = all;\n    return baseAssetId;\n  }\n\n  /**\n   * Retrieves the details of an asset given its ID.\n   *\n   * @param assetId - The unique identifier of the asset.\n   * @returns A promise that resolves to an object containing the asset details.\n   */\n  async getAssetDetails(assetId: string): Promise<GetAssetDetailsResponse | null> {\n    const { assetMetadata } = await this.getNodeFeatures();\n\n    if (!assetMetadata) {\n      throw new FuelError(\n        ErrorCode.UNSUPPORTED_FEATURE,\n        'The current node does not supports fetching asset details'\n      );\n    }\n\n    const { assetDetails } = await this.operations.getAssetDetails({ assetId });\n\n    if (!assetDetails) {\n      return null;\n    }\n\n    const { contractId, subId, totalSupply } = assetDetails ?? {};\n\n    return {\n      subId: subId ?? '',\n      contractId: contractId ?? '',\n      totalSupply: bn(totalSupply),\n    };","sourceCodeStart":1047,"sourceCodeEnd":1083,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/providers/provider.ts#L1047-L1083","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade fuel-core to a version that supports asset metadata and matches the SDK's compatibility matrix.","Point the Provider at a node known to support getAssetDetails (check release notes).","If you cannot upgrade, fetch asset info another way (e.g. contract read) and avoid getAssetDetails.","Gate the call: check (await provider.getNodeFeatures()).assetMetadata before invoking getAssetDetails."],"exampleFix":"// before\nconst details = await provider.getAssetDetails(assetId);\n\n// after — guard on node capability\nconst features = await provider.getNodeFeatures();\nif (!features.assetMetadata) {\n  throw new Error('Connected node does not support asset details; upgrade fuel-core.');\n}\nconst details = await provider.getAssetDetails(assetId);","handlingStrategy":"validation","validationCode":"async function assertSupportsAssetDetails(provider) {\n  const features = await provider.getNodeFeatures();\n  if (!features.assetMetadata) {\n    throw new Error('Connected node does not support asset details; upgrade fuel-core.');\n  }\n}","typeGuard":"async function nodeSupportsAssetDetails(provider): Promise<boolean> {\n  const features = await provider.getNodeFeatures();\n  return !!features.assetMetadata;\n}","tryCatchPattern":"import { FuelError, ErrorCode } from '@fuel-ts/errors';\ntry {\n  const details = await provider.getAssetDetails(assetId);\n} catch (e) {\n  if (e instanceof FuelError && e.code === ErrorCode.UNSUPPORTED_FEATURE) {\n    // fall back to reading asset info from the contract directly\n  }\n  throw e;\n}","preventionTips":["Gate getAssetDetails behind a getNodeFeatures() capability check.","Track the SDK<->fuel-core compatibility matrix.","Upgrade fuel-core when adopting newer SDK features."],"tags":["provider","node-compat","asset","feature-flag"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}