medusajs/medusa · error · Error
Method 'clearTransactionTimeout' not implemented.
Error message
Method 'clearTransactionTimeout' not implemented.
What it means
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.
Source
Thrown at packages/core/orchestration/src/transaction/datastore/abstract-storage.ts:130
async clearRetry(
transaction: DistributedTransactionType,
step: TransactionStep
): Promise<void> {
throw new Error("Method 'clearRetry' not implemented.")
}
async scheduleTransactionTimeout(
transaction: DistributedTransactionType,
timestamp: number,
interval: number
): Promise<void> {
throw new Error("Method 'scheduleTransactionTimeout' not implemented.")
}
async clearTransactionTimeout(
transaction: DistributedTransactionType
): Promise<void> {
throw new Error("Method 'clearTransactionTimeout' not implemented.")
}
async scheduleStepTimeout(
transaction: DistributedTransactionType,
step: TransactionStep,
timestamp: number,
interval: number
): Promise<void> {
throw new Error("Method 'scheduleStepTimeout' not implemented.")
}
async clearStepTimeout(
transaction: DistributedTransactionType,
step: TransactionStep
): Promise<void> {
throw new Error("Method 'clearStepTimeout' not implemented.")
}
View on GitHub (pinned to 5e06e544a2)
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
Example fix
// before
async clearTransactionTimeout(transaction) {
throw new Error("not implemented")
}
// after
async clearTransactionTimeout(transaction) {
await this.redis.del(`txTimeout:${transaction.transactionId}`)
} Defensive patterns
Strategy: validation
Validate before calling
// Before wiring the storage, assert optional lifecycle hooks are implemented
import { AbstractTransactionStore } from '@medusajs/orchestration'
const required = [
'clearTransactionTimeout',
'scheduleTransactionTimeout',
'clearStepTimeout',
'clearExpiredExecutions',
]
for (const m of required) {
if (storage[m] === AbstractTransactionStore.prototype[m]) {
throw new Error(`Storage adapter missing implementation: ${m}`)
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Method 'scheduleStepTimeout' not implemented.
- Method 'clearStepTimeout' not implemented.
- Method 'clearExpiredExecutions' not implemented.
- Unable to serialize context object. Please make sure the wor
- TransactionModel "${transaction.modelId}" cannot be orchestr
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/0ca3adb6901c92ba.
Report an issue: GitHub.