medusajs/medusa · error · Error
Method 'clearStepTimeout' not implemented.
Error message
Method 'clearStepTimeout' not implemented.
What it means
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.
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
Example fix
// before
async clearStepTimeout(transaction, step) {
throw new Error("not implemented")
}
// after
async clearStepTimeout(transaction, step) {
await this.redis.del(
`stepTimeout:${transaction.transactionId}:${step.id}`
)
} Defensive patterns
Strategy: validation
Validate before calling
if (storage.clearStepTimeout === AbstractTransactionStore.prototype.clearStepTimeout) {
throw new Error('Storage adapter cannot clear step timeouts')
} Prevention
- Implement clearStepTimeout whenever scheduleStepTimeout is implemented
- Run a full workflow with a timed step against new adapters in CI before deploying
When it happens
Trigger: 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.
Common situations: 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.
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 'clearExpiredExecutions' not implemented.
- Method 'clearTransactionTimeout' not implemented.
- Action not found.
- Cannot retry step when status is
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/700bbe6069e39e09.
Report an issue: GitHub.
Appendix: source
Thrown at packages/core/orchestration/src/transaction/datastore/abstract-storage.ts:146
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.")
}
async clearExpiredExecutions(): Promise<void> {
throw new Error("Method 'clearExpiredExecutions' not implemented.")
}
}
View on GitHub (pinned to 5e06e544a2)