paperclipai/paperclip · error · Error

Some items could not be approved.

Error message

Some items could not be approved.

What it means

Error "Some items could not be approved." thrown in paperclipai/paperclip.

Source

Thrown at ui/src/pages/Pipelines.tsx:4958

    },
  });

  const bulkApprove = useMutation({
    mutationFn: async (targetRows: ReviewQueueRow[]) => {
      if (!selectedCompanyId) throw new Error("Select an organization first.");
      const reviewRows = targetRows.filter((row) => row.kind === "review");
      const suggestionRows = targetRows.filter((row) => row.kind === "suggestion" && row.suggestionId);
      const tasks: Promise<unknown>[] = [];
      if (reviewRows.length > 0) {
        const items = reviewRows.map((row) => {
          if (row.expectedVersion === null) throw new Error("This item is not ready for a decision.");
          return { caseId: row.caseId, decision: "approve" as const, expectedVersion: row.expectedVersion };
        });
        tasks.push(
          pipelinesApi.bulkReviewCases(selectedCompanyId, { items }).then((response) => {
            const failures = (response.results ?? []).filter((result) => !result.ok);
            if (failures.length > 0) {
              throw new Error("Some items could not be approved.");
            }
          }),
        );
      }
      tasks.push(
        ...suggestionRows.map((row) =>
          pipelinesApi.resolveSuggestion(row.caseId, {
            suggestionId: row.suggestionId!,
            resolution: "accept",
            expectedVersion: row.expectedVersion ?? undefined,
          }),
        ),
      );
      await Promise.all(tasks);
    },
    onMutate: (targetRows) => {
      const ids = targetRows.map((row) => row.id);
      setPendingRowIds((current) => new Set([...current, ...ids]));

View on GitHub (pinned to 01ad858492)

Solutions

  1. Review which items failed approval and why, fix their state, and approve them again.

When it happens

Trigger: Thrown at ui/src/pages/Pipelines.tsx:4957 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/1ce60ece502a38e0. Report an issue: GitHub.