{"record":{"id":"700bbe6069e39e09","repo":"medusajs/medusa","slug":"method-clearsteptimeout-not-implemented","errorCode":null,"errorMessage":"Method 'clearStepTimeout' not implemented.","messagePattern":"Method 'clearStepTimeout' not implemented\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/orchestration/src/transaction/datastore/abstract-storage.ts","lineNumber":146,"sourceCode":"    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\n  async clearExpiredExecutions(): Promise<void> {\n    throw new Error(\"Method 'clearExpiredExecutions' not implemented.\")\n  }\n}\n","sourceCodeStart":128,"sourceCodeEnd":153,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/orchestration/src/transaction/datastore/abstract-storage.ts#L128-L153","documentation":"AbstractTransactionStore.clearStepTimeout is the counterpart of scheduleStepTimeout: the engine calls it when a step completes (or its timeout is cancelled) so the adapter removes the pending timeout. The base class throws by default so adapters without timeout support fail explicitly.","triggerScenarios":"A step that had a timeout scheduled finishes executing (success, failure, or compensation) while the configured workflow storage does not implement clearStepTimeout. Any step-timeout lifecycle event on an incomplete adapter triggers it.","commonSituations":"Custom storage adapter with only CRUD methods; upgrading the orchestration package which began calling clearStepTimeout on step completion; test harness with a partial in-memory store.","solutions":["Implement clearStepTimeout in your adapter (delete the stored timeout entry/cancel the timer)","Implement it together with scheduleStepTimeout — supporting one without the other still breaks the lifecycle","Use the official Redis storage if you cannot maintain timeout logic","Re-check abstract members after package upgrades"],"exampleFix":"// before\nasync clearStepTimeout(transaction, step) {\n  throw new Error(\"not implemented\")\n}\n\n// after\nasync clearStepTimeout(transaction, step) {\n  await this.redis.del(\n    `stepTimeout:${transaction.transactionId}:${step.id}`\n  )\n}","handlingStrategy":"validation","validationCode":"if (storage.clearStepTimeout === AbstractTransactionStore.prototype.clearStepTimeout) {\n  throw new Error('Storage adapter cannot clear step timeouts')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Implement clearStepTimeout whenever scheduleStepTimeout is implemented","Run a full workflow with a timed step against new adapters in CI before deploying"],"tags":["orchestration","workflow","step-timeout","storage-adapter"],"backgroundTag":"unimplemented-abstract-method","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}