{"record":{"id":"e6fb53466f69d738","repo":"FuelLabs/fuels-ts","slug":"unsupported-transaction-type-e6fb53","errorCode":"UNSUPPORTED_TRANSACTION_TYPE","errorMessage":"Unsupported transaction type: ${transactionType}.","messagePattern":"Unsupported transaction type: (.+?)\\.","errorType":"validation","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/account/src/providers/transaction-summary/operations.ts","lineNumber":80,"sourceCode":" * @param transactionType - The transaction type enum value.\n * @returns The transaction type's name.\n */\nexport function getTransactionTypeName(transactionType: TransactionType): TransactionTypeName {\n  switch (transactionType) {\n    case TransactionType.Mint:\n      return TransactionTypeName.Mint;\n    case TransactionType.Create:\n      return TransactionTypeName.Create;\n    case TransactionType.Script:\n      return TransactionTypeName.Script;\n    case TransactionType.Blob:\n      return TransactionTypeName.Blob;\n    case TransactionType.Upgrade:\n      return TransactionTypeName.Upgrade;\n    case TransactionType.Upload:\n      return TransactionTypeName.Upload;\n    default:\n      throw new FuelError(\n        ErrorCode.UNSUPPORTED_TRANSACTION_TYPE,\n        `Unsupported transaction type: ${transactionType}.`\n      );\n  }\n}\n\n/** @hidden */\nexport function isType(transactionType: TransactionType, type: TransactionTypeName) {\n  const txType = getTransactionTypeName(transactionType);\n\n  return txType === type;\n}\n\n/** @hidden */\nexport function isTypeMint(transactionType: TransactionType) {\n  return isType(transactionType, TransactionTypeName.Mint);\n}\n","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/providers/transaction-summary/operations.ts#L62-L98","documentation":"Thrown by `getTransactionTypeName()` (transaction-summary/operations.ts) when mapping a numeric `TransactionType` to a `TransactionTypeName` and the value does not match any known case (Mint, Create, Script, Blob, Upgrade, Upload). The default branch rejects unknown numeric types so summary code never operates on an undefined name.","triggerScenarios":"Calling `getTransactionTypeName()` / `isType()` (which depends on it) with a transaction type outside the enum. Reached when building a transaction summary for a transaction whose type discriminator is unrecognized.","commonSituations":"SDK version mismatch where the node returns a transaction type the client SDK does not yet know (e.g. a new tx type shipped on-chain before the SDK supported it); corrupted transaction payload with a bad type byte.","solutions":["Upgrade @fuel-ts packages to a version that supports the transaction type returned by the node.","Filter or skip transactions with unknown types before summary assembly.","Report the unknown type value to the SDK maintainers if it persists on a current version."],"exampleFix":"// before\nconst name = getTransactionTypeName(99); // throws\n// after\nimport { TransactionType } from '@fuel-ts/transactions';\nif (tx.type <= TransactionType.Upload) {\n  const name = getTransactionTypeName(tx.type);\n} else {\n  // skip unsupported / unknown tx type\n}","handlingStrategy":"validation","validationCode":"import { TransactionType } from '@fuel-ts/transactions';\nconst SUPPORTED = [TransactionType.Mint, TransactionType.Create, TransactionType.Script, TransactionType.Blob, TransactionType.Upgrade, TransactionType.Upload];\nif (!SUPPORTED.includes(txType)) throw new Error(`unsupported tx type ${txType}`);","typeGuard":"function isSupportedTransactionType(t: unknown): t is import('@fuel-ts/transactions').TransactionType {\n  return typeof t === 'number' && t >= 0 && t <= TransactionType.Upload;\n}","tryCatchPattern":"null","preventionTips":["Upgrade @fuel-ts packages to match the node's supported transaction types.","Filter unknown-type transactions before summary assembly.","Log the numeric type when this fires to identify version skew."],"tags":["transaction","summary","type-validation","version-compat"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}