medusajs/medusa · error · MedusaError
No shipping method found for order ${input.order_id} in orde
Error message
No shipping method found for order ${input.order_id} in order change ${orderChange.id} What it means
validateDraftOrderShippingMethodActionStep looks for input.action_id among the order change's actions; if absent, the shipping-method action you target does not exist in the pending change.
Source
Thrown at packages/core/core-flows/src/draft-order/steps/validate-draft-order-shipping-method-action.ts:57
* },
* orderChange: {
* id: "orch_123",
* // other order change details...
* }
* })
*/
export const validateDraftOrderShippingMethodActionStep = createStep(
"validate-draft-order-shipping-method-action",
async function ({
input,
orderChange,
}: ValidateDraftOrderShippingMethodActionStepInput) {
const associatedAction = (orderChange.actions ?? []).find(
(a) => a.id === input.action_id
) as OrderChangeActionDTO
if (!associatedAction) {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`No shipping method found for order ${input.order_id} in order change ${orderChange.id}`
)
}
if (associatedAction.action !== ChangeActionType.SHIPPING_ADD) {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`Action ${associatedAction.id} is not adding a shipping method`
)
}
}
)
View on GitHub (pinned to 5e06e544a2)
Solutions
- Re-fetch the pending order change and its actions, use a current SHIPPING_ADD action id
- Verify the order change status is still pending
- Refresh client state after confirm operations
Example fix
// before
await deleteDraftOrderShippingMethodWorkflow(container).run({ input: { order_id, action_id: staleId } })
// after
const changes = await query.graph({ entity: "order_change", filters: { order_id }, fields: ["status", "actions.*"] })
const action = changes.data[0]?.actions.find((a) => a.action === "SHIPPING_ADD")
if (action) {
await deleteDraftOrderShippingMethodWorkflow(container).run({ input: { order_id, action_id: action.id } })
} Defensive patterns
Strategy: validation
Validate before calling
const changes = await query.graph({ entity: "order_change", filters: { order_id }, fields: ["actions.id", "actions.action"] })
const exists = changes.data[0]?.actions.some((a) => a.id === action_id && a.action === "SHIPPING_ADD") Try / catch
try { await workflow(scope).run({ input }) } catch (e) { if (/No shipping method found for order .* in order change/.test(e.message)) { /* refetch actions */ } throw e } Prevention
- Refetch pending change actions before shipping-method removals
- Confirm the change is still pending
When it happens
Trigger: Calling the draft-order remove/update shipping method action workflow with an action_id not present on the current pending order change.
Common situations: Change already confirmed; stale action id from an earlier UI load; concurrent edit; wrong order's change.
Related errors
- A shipping method with id ${input.shipping_method_id} was no
- No item found for order ${input.order_id} in order change ${
- No request to add item for order ${input.order_id} in order
- Action ${associatedAction.id} is not adding or updating an i
- Action ${associatedAction.id} is not adding a shipping metho
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/d310760cae69c318.
Report an issue: GitHub.