medusajs/medusa · error · MedusaError
not_found
not_found
Error message
Store not found
What it means
The Redis engine's getRunningTransaction throws a plain Error 'TransactionId ID is required' when transactionId is falsy — it cannot inspect or resume a transaction without its id (note the doubled 'Id ID' wording in the message).
Source
Thrown at packages/core/core-flows/src/cart/steps/find-one-or-any-region.ts:88
/**
* This step retrieves a region either by the provided ID or the first region in the first store.
*/
export const findOneOrAnyRegionStep = createStep(
findOneOrAnyRegionStepId,
async (data: FindOneOrAnyRegionStepInput, { container }) => {
if (data.regionId) {
try {
const region = await fetchRegionById(data.regionId, container)
return new StepResponse(region)
} catch (error) {
return new StepResponse(null)
}
}
const store = await fetchDefaultStore(container)
if (!store) {
throw new MedusaError(MedusaError.Types.NOT_FOUND, "Store not found")
}
const region = await fetchDefaultRegion(store.default_region_id!, container)
if (!region) {
return new StepResponse(null)
}
return new StepResponse(region)
}
)
View on GitHub (pinned to 5e06e544a2)
Solutions
- Capture and persist the transactionId when the run starts (pass your own via context.transactionId to control it)
- Validate before calling
- Look up the transactionId from your run records first
Example fix
// before
await engine.getRunningTransaction('orders', undefined)
// after
await engine.getRunningTransaction('orders', await loadTxIdForOrder(orderId)) Defensive patterns
Strategy: validation
Validate before calling
if (!transactionId) throw new Error('transactionId is required')
await engine.getRunningTransaction(workflowId, transactionId) Type guard
const isTxId = (v: unknown): v is string => typeof v === 'string' && v.length > 0
Try / catch
catch (e) { if (e.message === 'TransactionId ID is required') return badRequest(); throw e } Prevention
- Pass explicit transactionId at run() so later lookups are deterministic
- Store transaction ids keyed by business entity
When it happens
Trigger: Calling getRunningTransaction(workflowId, undefined | '') — e.g. inspecting a waiting workflow without the id captured at start.
Common situations: The 'auto-<ULID>' generated transactionId was never persisted; resuming from webhook data missing the transaction reference.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- --paths must be a directory - ${additionalPath}
- --base must be a file - ${baseFile}
- insufficient_inventory
- --config file must be of type .json or .yaml - ${configFileC
- invalid_data
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/110ba5b941967887.
Report an issue: GitHub.