medusajs/medusa · error · MedusaError
invalid_data
invalid_data
Error message
Unable to assign cart to disabled Sales Channel: ${salesChannel.name} What it means
getRunningTransaction in the Redis engine resolves the flow from the MedusaWorkflow registry; an unregistered workflowId throws a plain Error naming the missing id. The registry is per-process, so the workflow must be imported where the call runs.
Source
Thrown at packages/core/core-flows/src/cart/steps/find-sales-channel.ts:81
if (data.salesChannelId) {
salesChannel = await fetchSalesChannel(data.salesChannelId, container)
} else if (!isDefined(data.salesChannelId)) {
const [store] = await fetchStore(container)
if (store?.default_sales_channel_id) {
salesChannel = await fetchSalesChannel(
store.default_sales_channel_id,
container
)
}
}
if (!salesChannel) {
return new StepResponse(null)
}
if (salesChannel?.is_disabled) {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`Unable to assign cart to disabled Sales Channel: ${salesChannel.name}`
)
}
return new StepResponse(salesChannel)
}
)
View on GitHub (pinned to 5e06e544a2)
Solutions
- Import the workflow module in the inspecting process
- Use the exported workflow's id constant
- Route lookups through a service that has the workflow registered
Example fix
// before
await engine.getRunningTransaction(storedId, txId)
// after
if (!MedusaWorkflow.getWorkflow(storedId)) throw new Error(`Unknown workflow ${storedId}`)
await engine.getRunningTransaction(storedId, txId) Defensive patterns
Strategy: type-guard
Validate before calling
if (!MedusaWorkflow.getWorkflow(workflowId)) throw new Error(`workflow ${workflowId} not registered here`)
await engine.getRunningTransaction(workflowId, transactionId) Type guard
const isRegistered = (id: string) => Boolean(MedusaWorkflow.getWorkflow(id))
Try / catch
catch (e) { if (e.message.includes('not found')) return notFound(); throw e } Prevention
- Import workflow modules in any process that inspects transactions
When it happens
Trigger: Calling getRunningTransaction with an id not registered via createWorkflow in the current process — typo, unimported module, or engine in a separate deployment.
Common situations: Status/inspection services that read workflow ids from the database but never import the definitions; multi-process deployments splitting registration and inspection.
Related errors
- --config file must be of type .json or .yaml - ${configFileC
- invalid_data
- Key ${key} already exists in app metadata
- --paths must be a directory - ${additionalPath}
- --base must be a file - ${baseFile}
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/cfbc0c62b6a03138.
Report an issue: GitHub.