{"record":{"id":"206425ed93fb3908","repo":"FuelLabs/fuels-ts","slug":"invalid-input-parameters-206425","errorCode":"INVALID_INPUT_PARAMETERS","errorMessage":"commitBlockId and commitBlockHeight cannot be used together","messagePattern":"commitBlockId and commitBlockHeight cannot be used together","errorType":"validation","errorClass":"FuelError","httpStatus":null,"severity":"warning","filePath":"packages/account/src/providers/provider.ts","lineNumber":2386,"sourceCode":"    transactionId: string,\n    nonce: string,\n    commitBlockId?: string,\n    commitBlockHeight?: BN\n  ): Promise<MessageProof> {\n    let inputObject: {\n      /** The transaction to get message from */\n      transactionId: string;\n      /** The message id from MessageOut receipt */\n      nonce: string;\n      commitBlockId?: string;\n      commitBlockHeight?: string;\n    } = {\n      transactionId,\n      nonce,\n    };\n\n    if (commitBlockId && commitBlockHeight) {\n      throw new FuelError(\n        ErrorCode.INVALID_INPUT_PARAMETERS,\n        'commitBlockId and commitBlockHeight cannot be used together'\n      );\n    }\n\n    if (commitBlockId) {\n      inputObject = {\n        ...inputObject,\n        commitBlockId,\n      };\n    }\n\n    if (commitBlockHeight) {\n      inputObject = {\n        ...inputObject,\n        // Convert BN into a number string required on the query\n        // This should probably be fixed on the fuel client side\n        commitBlockHeight: commitBlockHeight.toNumber().toString(),","sourceCodeStart":2368,"sourceCodeEnd":2404,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/providers/provider.ts#L2368-L2404","documentation":"Thrown by Provider.getMessageProof when both commitBlockId and commitBlockHeight are supplied simultaneously. The node's message-proof query accepts at most one commit-block reference; passing both is ambiguous, so the SDK rejects it before sending the request. Provide one or the other (or neither).","triggerScenarios":"Calling provider.getMessageProof(txId, nonce, commitBlockId, commitBlockHeight) with both optional block-reference arguments populated; copying a call signature and filling every optional field.","commonSituations":"Caller has both values handy and passes both for 'completeness'; refactor merged two code paths that each set one field; misunderstanding the overloads as additive rather than exclusive.","solutions":["Pass exactly one of commitBlockId or commitBlockHeight (or omit both to let the node resolve).","If you have a height, prefer commitBlockHeight; if you have a block id, prefer commitBlockId.","Add a guard before the call: if (commitBlockId && commitBlockHeight) throw locally with a clearer message.","Audit call sites that forward both args and pick one based on which is more authoritative."],"exampleFix":"// before\nawait provider.getMessageProof(txId, nonce, blockId, blockHeight);\n\n// after — pass only one reference\nawait provider.getMessageProof(txId, nonce, blockId /*, undefined */);\n// or\nawait provider.getMessageProof(txId, nonce, undefined, blockHeight);","handlingStrategy":"validation","validationCode":"function assertSingleBlockRef(commitBlockId?: string, commitBlockHeight?: unknown) {\n  if (commitBlockId && commitBlockHeight) {\n    throw new Error('Pass either commitBlockId or commitBlockHeight, not both.');\n  }\n}","typeGuard":"function hasMutuallyExclusiveBlockRef(commitBlockId?: string, commitBlockHeight?: unknown): boolean {\n  return !(commitBlockId && commitBlockHeight);\n}","tryCatchPattern":"import { FuelError, ErrorCode } from '@fuel-ts/errors';\ntry {\n  await provider.getMessageProof(txId, nonce, commitBlockId, commitBlockHeight);\n} catch (e) {\n  if (e instanceof FuelError && e.code === ErrorCode.INVALID_INPUT_PARAMETERS) {\n    // drop one of the two block references and retry\n  }\n  throw e;\n}","preventionTips":["Pass at most one of commitBlockId / commitBlockHeight.","Centralize message-proof calls in one helper enforcing the invariant.","Prefer the value you actually have rather than both."],"tags":["provider","message-proof","validation","api-usage"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}