medusajs/medusa · error · Error

No request claim found for claim ${input.claim_id} in order

Error message

No request claim found for claim ${input.claim_id} in order change ${orderChange.id}

What it means

Thrown when updating a claim item (write-off/claimed item): no order change action with the given action_id exists in the claim's order change. The workflow needs the existing WRITE_OFF_ITEM action to modify the claimed quantity.

Source

Thrown at packages/core/core-flows/src/order/workflows/claim/update-claim-item.ts:104

  async function (
    {
      order,
      orderChange,
      orderClaim,
      input,
    }: UpdateClaimItemValidationStepInput,
    context
  ) {
    throwIfIsCancelled(order, "Order")
    throwIfIsCancelled(orderClaim, "Claim")
    throwIfOrderChangeIsNotActive({ orderChange })

    const associatedAction = (orderChange.actions ?? []).find(
      (a) => a.id === input.action_id
    ) as OrderChangeActionDTO

    if (!associatedAction) {
      throw new Error(
        `No request claim found for claim ${input.claim_id} in order change ${orderChange.id}`
      )
    } else if (associatedAction.action !== ChangeActionType.WRITE_OFF_ITEM) {
      throw new Error(`Action ${associatedAction.id} is not claiming the item`)
    }
  }
)

export const updateClaimItemWorkflowId = "update-claim-item"
/**
 * This workflow updates a claim item, added to the claim from an order item.
 * It's used by the [Update Claim Item Admin API Route](https://docs.medusajs.com/api/admin/claims/update-a-claim-item).
 * 
 * You can use this workflow within your customizations or your own custom workflows, allowing you to update a claim item
 * in your custom flows.
 * 
 * @example
 * const { result } = await updateClaimItemWorkflow(container)

View on GitHub (pinned to 5e06e544a2)

Solutions

  1. Fetch the claim's order change and confirm it's still pending with the action present
  2. Use an action_id of type WRITE_OFF_ITEM from that same claim
  3. If the claim is confirmed, create a new claim instead
Defensive patterns

Strategy: validation

Validate before calling

const action = (orderChange.actions ?? []).find((a) => a.id === input.action_id)
if (!action) { /* refetch claim / skip */ }

Try / catch

try { await updateClaimItemWorkflow(scope).run({ input }) } catch (e) { if (/No request claim found/.test(e.message)) await refetchClaim() else throw e }

Prevention

When it happens

Trigger: Calling updateClaimItemWorkflow with an action_id not present in the claim's order change actions — stale id, different claim, or the order change was already confirmed/canceled.

Common situations: Editing claim items after claim confirmation; using an action id obtained from an exchange's order change; concurrent edit where the action was removed.

Related errors


AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27). Data as JSON: /api/errors/75119a2eef1bd102. Report an issue: GitHub.