{"record":{"id":"b3e6e1d0e398c151","repo":"medusajs/medusa","slug":"action-associatedaction-id-is-not-adding-a-ship-b3e6e1","errorCode":null,"errorMessage":"Action ${associatedAction.id} is not adding a shipping method","messagePattern":"Action (.+?) is not adding a shipping method","errorType":"validation","errorClass":"Error","httpStatus":500,"severity":"error","filePath":"packages/core/core-flows/src/order/workflows/claim/update-claim-shipping-method.ts","lineNumber":101,"sourceCode":"  \"validate-update-claim-shipping-method\",\n  async function ({\n    orderChange,\n    orderClaim,\n    input,\n  }: UpdateClaimShippingMethodValidationStepInput) {\n    throwIfIsCancelled(orderClaim, \"Claim\")\n    throwIfOrderChangeIsNotActive({ orderChange })\n\n    const associatedAction = (orderChange.actions ?? []).find(\n      (a) => a.id === input.action_id\n    ) as OrderChangeActionDTO\n\n    if (!associatedAction) {\n      throw new Error(\n        `No shipping method found for claim ${input.claim_id} in order change ${orderChange.id}`\n      )\n    } else if (associatedAction.action !== ChangeActionType.SHIPPING_ADD) {\n      throw new Error(\n        `Action ${associatedAction.id} is not adding a shipping method`\n      )\n    }\n  }\n)\n\nexport const updateClaimShippingMethodWorkflowId =\n  \"update-claim-shipping-method\"\n/**\n * This workflow updates a claim's inbound (return) or outbound (delivery of new items) shipping method.\n * It's used by the [Update Inbound Shipping Admin API Route](https://docs.medusajs.com/api/admin/claims/update-inbound-shipping),\n * and the [Update Outbound Shipping Admin API Route](https://docs.medusajs.com/api/admin/claims/update-outbound-shipping).\n *\n * You can use this workflow within your customizations or your own custom workflows, allowing you to update a claim's shipping method\n * in your own custom flows.\n *\n * @example\n * const { result } = await updateClaimShippingMethodWorkflow(container)","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/core-flows/src/order/workflows/claim/update-claim-shipping-method.ts#L83-L119","documentation":"Thrown when updating a claim's shipping method: the referenced action exists but is not of type SHIPPING_ADD. Only shipping-add actions can be updated by this workflow.","triggerScenarios":"Calling updateClaimShippingMethodWorkflow with an action_id whose action type is ITEM_ADD, WRITE_OFF_ITEM, etc.","commonSituations":"Passing the wrong action row from the admin order-change list; mixing up workflows for items vs shipping methods.","solutions":["Filter for action === ChangeActionType.SHIPPING_ADD before selecting the id","Ensure the action id comes from createClaimShippingMethodWorkflow output","Use the item-update workflow if you meant to update an item"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (orderChange.actions?.find((a) => a.id === actionId)?.action !== ChangeActionType.SHIPPING_ADD) throw new Error('Wrong action')","typeGuard":"const isShippingAddAction = (a?: OrderChangeActionDTO) =>\n  !!a && a.action === ChangeActionType.SHIPPING_ADD","tryCatchPattern":null,"preventionTips":["Keep separate state for shipping vs item action ids"],"tags":["order","claim","shipping-method","validation"],"backgroundTag":"invalid-order-change-action-type","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}