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.

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)

Solutions

  1. Implement clearStepTimeout in your adapter (delete the stored timeout entry/cancel the timer)
  2. Implement it together with scheduleStepTimeout — supporting one without the other still breaks the lifecycle
  3. Use the official Redis storage if you cannot maintain timeout logic
  4. 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

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

Related errors


AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27). Data as JSON: /api/errors/700bbe6069e39e09. Report an issue: GitHub.