{"record":{"id":"45a12f0e498e82bd","repo":"FuelLabs/fuels-ts","slug":"transaction-not-found","errorCode":"TRANSACTION_NOT_FOUND","errorMessage":"Transaction not found for given id: ${id}.","messagePattern":"Transaction not found for given id: (.+?)\\.","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/account/src/providers/transaction-summary/get-transaction-summary.ts","lineNumber":35,"sourceCode":"import type { AbiMap, GraphqlTransactionStatus, TransactionSummary } from './types';\n/** @hidden */\nexport interface GetTransactionSummaryParams {\n  id: string;\n  provider: Provider;\n  abiMap?: AbiMap;\n}\n\nexport async function getTransactionSummary<TTransactionType = void>(\n  params: GetTransactionSummaryParams\n): Promise<TransactionResult> {\n  const { id, provider, abiMap } = params;\n\n  const { transaction: gqlTransaction } = await provider.operations.getTransactionWithReceipts({\n    transactionId: id,\n  });\n\n  if (!gqlTransaction) {\n    throw new FuelError(\n      ErrorCode.TRANSACTION_NOT_FOUND,\n      `Transaction not found for given id: ${id}.`\n    );\n  }\n\n  const [decodedTransaction] = new TransactionCoder().decode(\n    arrayify(gqlTransaction.rawPayload),\n    0\n  );\n\n  let txReceipts: TransactionReceiptJson[] = [];\n\n  if (gqlTransaction?.status && 'receipts' in gqlTransaction.status) {\n    txReceipts = gqlTransaction.status.receipts;\n  }\n\n  const receipts = txReceipts.map(deserializeReceipt);\n","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/providers/transaction-summary/get-transaction-summary.ts#L17-L53","documentation":"Thrown by `getTransactionSummary()` when the provider's `getTransactionWithReceipts` GraphQL query returns a null transaction for the supplied id. The SDK treats a missing transaction as a hard error because it cannot decode receipts or build a summary without the on-chain record. This usually means the transaction was never included or has not yet been indexed.","triggerScenarios":"Calling `getTransactionSummary({ id, provider })` (directly or via `transactionResponse.getTransactionSummary()` / `assembleTransactionSummary`) with an id the node has no record of. The `gqlTransaction` object comes back falsy from the query.","commonSituations":"Querying a transaction id immediately after submission before it is indexed; typo or truncated transaction id; transaction was squeezed out and never landed; pointing the provider at a different node/network than the one that received the tx; querying testnet id against mainnet.","solutions":["Confirm the transaction id is complete and correct (0x-prefixed 32-byte hash).","Verify the provider URL matches the network where the transaction was submitted.","Poll or wait for inclusion before calling getTransactionSummary (e.g. await `submitAndAwaitStatus` first).","If the tx was squeezed out, resubmit and use the new id."],"exampleFix":"// before\nconst summary = await getTransactionSummary({ id: '0xabc...', provider }); // throws\n// after\nawait txResponse.waitForPreConfirmation(); // ensure inclusion first\nconst summary = await getTransactionSummary({\n  id: txResponse.id,\n  provider,\n});","handlingStrategy":"validation","validationCode":"const { transaction } = await provider.operations.getTransactionWithReceipts({ transactionId: id });\nif (!transaction) throw new Error(`tx ${id} not found; verify network and inclusion`);","typeGuard":"null","tryCatchPattern":"import { ErrorCode } from '@fuel-ts/errors';\ntry {\n  return await getTransactionSummary({ id, provider });\n} catch (e) {\n  if (e.code === ErrorCode.TRANSACTION_NOT_FOUND) { /* wait for inclusion then retry */ }\n  else throw e;\n}","preventionTips":["Ensure the tx is included (await submitAndAwaitStatus) before querying its summary.","Verify the provider URL matches the network the tx was sent to.","Validate the id format (0x + 64 hex chars)."],"tags":["network","transaction","query","runtime","validation"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}