{"record":{"id":"1ce60ece502a38e0","repo":"paperclipai/paperclip","slug":"some-items-could-not-be-approved","errorCode":null,"errorMessage":"Some items could not be approved.","messagePattern":"Some items could not be approved\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/Pipelines.tsx","lineNumber":4958,"sourceCode":"    },\n  });\n\n  const bulkApprove = useMutation({\n    mutationFn: async (targetRows: ReviewQueueRow[]) => {\n      if (!selectedCompanyId) throw new Error(\"Select an organization first.\");\n      const reviewRows = targetRows.filter((row) => row.kind === \"review\");\n      const suggestionRows = targetRows.filter((row) => row.kind === \"suggestion\" && row.suggestionId);\n      const tasks: Promise<unknown>[] = [];\n      if (reviewRows.length > 0) {\n        const items = reviewRows.map((row) => {\n          if (row.expectedVersion === null) throw new Error(\"This item is not ready for a decision.\");\n          return { caseId: row.caseId, decision: \"approve\" as const, expectedVersion: row.expectedVersion };\n        });\n        tasks.push(\n          pipelinesApi.bulkReviewCases(selectedCompanyId, { items }).then((response) => {\n            const failures = (response.results ?? []).filter((result) => !result.ok);\n            if (failures.length > 0) {\n              throw new Error(\"Some items could not be approved.\");\n            }\n          }),\n        );\n      }\n      tasks.push(\n        ...suggestionRows.map((row) =>\n          pipelinesApi.resolveSuggestion(row.caseId, {\n            suggestionId: row.suggestionId!,\n            resolution: \"accept\",\n            expectedVersion: row.expectedVersion ?? undefined,\n          }),\n        ),\n      );\n      await Promise.all(tasks);\n    },\n    onMutate: (targetRows) => {\n      const ids = targetRows.map((row) => row.id);\n      setPendingRowIds((current) => new Set([...current, ...ids]));","sourceCodeStart":4940,"sourceCodeEnd":4976,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/pages/Pipelines.tsx#L4940-L4976","documentation":"Error \"Some items could not be approved.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/Pipelines.tsx:4957 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review which items failed approval and why, fix their state, and approve them again."],"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"}