{"record":{"id":"33bada2f9e667ee7","repo":"medusajs/medusa","slug":"invalid-data-33bada","errorCode":"INVALID_DATA","errorMessage":"No request to add item for claim ${input.claim_id} in order change ${orderChange.id}","messagePattern":"No request to add item for claim (.+?) in order change (.+?)","errorType":"validation","errorClass":"MedusaError","httpStatus":400,"severity":"error","filePath":"packages/core/core-flows/src/order/workflows/claim/update-claim-add-item.ts","lineNumber":108,"sourceCode":"  async function (\n    {\n      order,\n      orderChange,\n      orderClaim,\n      input,\n    }: UpdateClaimAddNewItemValidationStepInput,\n    context\n  ) {\n    throwIfIsCancelled(order, \"Order\")\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 MedusaError(\n        MedusaError.Types.INVALID_DATA, \n        `No request to add item for claim ${input.claim_id} in order change ${orderChange.id}`\n      )\n    } else if (associatedAction.action !== ChangeActionType.ITEM_ADD) {\n      throw new MedusaError(\n        MedusaError.Types.INVALID_DATA,\n        `Action ${associatedAction.id} is not adding an item`\n      )\n    }\n  }\n)\n\nconst orderFields = [\n  ...fieldsToComputeAdjustmentsForPreview,\n  \"status\",\n  \"canceled_at\",\n]\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/core-flows/src/order/workflows/claim/update-claim-add-item.ts#L90-L126","documentation":"Thrown when updating a claim's add-item request: no order change action with the given action_id exists in the order change for that claim. The workflow looks up the pending ITEM_ADD action to modify; if it can't be found, the input is invalid.","triggerScenarios":"Calling updateClaimAddItemWorkflow with an action_id that doesn't match any action in the claim's order change — e.g. after the claim was confirmed (order change no longer pending) or the action belongs to a different claim/exchange.","commonSituations":"Editing a claim item in the admin after the claim was confirmed; passing an action id from a different order change; deleted/expired action id from stale UI state.","solutions":["Confirm the claim is still in a pending order change (not yet confirmed)","Re-fetch the claim's order change actions and use a valid action_id of type ITEM_ADD","If the claim was confirmed, create a new claim instead of updating the old one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const action = (orderChange.actions ?? []).find((a) => a.id === input.action_id)\nif (!action || action.action !== ChangeActionType.ITEM_ADD) {\n  // refresh claim data instead of calling the workflow\n}","typeGuard":"const isItemAddAction = (a?: OrderChangeActionDTO) =>\n  !!a && a.action === ChangeActionType.ITEM_ADD","tryCatchPattern":"try { await updateClaimAddItemWorkflow(scope).run({ input }) } catch (e) { if (/No request to add item/.test(e.message)) await refetchClaim() else throw e }","preventionTips":["Only update items on claims with a pending order change","Re-fetch order change actions when the admin UI has been open a while"],"tags":["order","claim","order-change","validation"],"backgroundTag":"order-change-action-not-found","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}