{"record":{"id":"7dcc5224a6523230","repo":"paperclipai/paperclip","slug":"missing-item-version","errorCode":null,"errorMessage":"Missing item version","messagePattern":"Missing item version","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/Pipelines.tsx","lineNumber":2684,"sourceCode":"    [detail, stages],\n  );\n  const reviewActions = useMemo(\n    () => reviewConfig ? reviewDecisionActions(reviewConfig, stageLookup) : [],\n    [reviewConfig, stageLookup],\n  );\n  const nextReviewItem = useMemo(() => {\n    const rows = reviewQueueItems.data ?? [];\n    if (rows.length === 0) return null;\n    const currentIndex = rows.findIndex((row) => row.case.id === caseId);\n    if (currentIndex >= 0) {\n      const laterRow = rows.slice(currentIndex + 1).find((row) => row.case.id !== caseId);\n      if (laterRow) return laterRow;\n    }\n    return rows.find((row) => row.case.id !== caseId) ?? null;\n  }, [caseId, reviewQueueItems.data]);\n  const decideReview = useMutation({\n    mutationFn: ({ decision }: { decision: PipelineReviewDecision }) => {\n      if (!detail?.case.version) throw new Error(\"Missing item version\");\n      return pipelinesApi.reviewCase(caseId, {\n        decision,\n        reason: reviewDecisionNote.trim() || null,\n        expectedVersion: detail.case.version,\n      });\n    },\n    onSuccess: async (_result, variables) => {\n      let nextHref = nextReviewItem\n        ? `/pipelines/${nextReviewItem.pipeline.id}/items/${nextReviewItem.case.id}`\n        : null;\n      if (!nextHref && selectedCompanyId) {\n        try {\n          const latestReviewItems = await pipelinesApi.listReviewCases(selectedCompanyId, { pipelineId });\n          const latestNextItem = latestReviewItems.find((row) => row.case.id !== caseId) ?? null;\n          nextHref = latestNextItem\n            ? `/pipelines/${latestNextItem.pipeline.id}/items/${latestNextItem.case.id}`\n            : null;\n        } catch {","sourceCodeStart":2666,"sourceCodeEnd":2702,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/pages/Pipelines.tsx#L2666-L2702","documentation":"Error \"Missing item version\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/Pipelines.tsx:2683 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reload the pipeline so the item version is available, then retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}