{"record":{"id":"0ca3adb6901c92ba","repo":"medusajs/medusa","slug":"method-cleartransactiontimeout-not-implemented","errorCode":null,"errorMessage":"Method 'clearTransactionTimeout' not implemented.","messagePattern":"Method 'clearTransactionTimeout' not implemented\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/orchestration/src/transaction/datastore/abstract-storage.ts","lineNumber":130,"sourceCode":"  async clearRetry(\n    transaction: DistributedTransactionType,\n    step: TransactionStep\n  ): Promise<void> {\n    throw new Error(\"Method 'clearRetry' not implemented.\")\n  }\n\n  async scheduleTransactionTimeout(\n    transaction: DistributedTransactionType,\n    timestamp: number,\n    interval: number\n  ): Promise<void> {\n    throw new Error(\"Method 'scheduleTransactionTimeout' not implemented.\")\n  }\n\n  async clearTransactionTimeout(\n    transaction: DistributedTransactionType\n  ): Promise<void> {\n    throw new Error(\"Method 'clearTransactionTimeout' not implemented.\")\n  }\n\n  async scheduleStepTimeout(\n    transaction: DistributedTransactionType,\n    step: TransactionStep,\n    timestamp: number,\n    interval: number\n  ): Promise<void> {\n    throw new Error(\"Method 'scheduleStepTimeout' not implemented.\")\n  }\n\n  async clearStepTimeout(\n    transaction: DistributedTransactionType,\n    step: TransactionStep\n  ): Promise<void> {\n    throw new Error(\"Method 'clearStepTimeout' not implemented.\")\n  }\n","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/orchestration/src/transaction/datastore/abstract-storage.ts#L112-L148","documentation":"AbstractTransactionStore.clearTransactionTimeout is an optional hook on the workflow storage adapter. The base class intentionally throws so any storage implementation that does not override timeout support fails loudly the first time the engine tries to clear a step/transaction timeout. It signals an incomplete storage adapter rather than a runtime data problem.","triggerScenarios":"The orchestration engine calls clearTransactionTimeout (e.g. after a transaction timeout fires or a transaction finishes/cancels) while using a custom storage that extends AbstractTransactionStore without implementing clearTransactionTimeout. Also triggered by clearExpiredExecutions/timeout flows if the adapter only implemented the required CRUD methods.","commonSituations":"Writing a custom workflow storage (Redis, in-memory, custom DB) and implementing only list/save/get/delete; upgrading @medusajs/orchestration to a version that added timeout APIs your adapter predates; using a mock storage in tests that hits a timeout path.","solutions":["Implement clearTransactionTimeout (and scheduleTransactionTimeout) in your custom storage adapter, or delegate to a no-op if timeouts are managed externally","If you don't need timeouts, have the method resolve without throwing (no-op) rather than leaving the abstract stub","Use the built-in RedisWorkflowEngineStorage or the default storage which already implement these methods","After upgrading the orchestration package, diff AbstractTransactionStore against your adapter and implement any new abstract members"],"exampleFix":"// before\nasync clearTransactionTimeout(transaction) {\n  throw new Error(\"not implemented\")\n}\n\n// after\nasync clearTransactionTimeout(transaction) {\n  await this.redis.del(`txTimeout:${transaction.transactionId}`)\n}","handlingStrategy":"validation","validationCode":"// Before wiring the storage, assert optional lifecycle hooks are implemented\nimport { AbstractTransactionStore } from '@medusajs/orchestration'\n\nconst required = [\n  'clearTransactionTimeout',\n  'scheduleTransactionTimeout',\n  'clearStepTimeout',\n  'clearExpiredExecutions',\n]\nfor (const m of required) {\n  if (storage[m] === AbstractTransactionStore.prototype[m]) {\n    throw new Error(`Storage adapter missing implementation: ${m}`)\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cover all optional hooks when writing a custom storage adapter, even as no-ops","Add a startup smoke test that instantiates your adapter against the base class and asserts no member equals the throwing default","Re-diff your adapter against AbstractTransactionStore after every @medusajs/orchestration upgrade"],"tags":["orchestration","workflow","storage-adapter","abstract-method"],"backgroundTag":"unimplemented-abstract-method","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}