different-ai/openwork · error

Failed to load collection access (${response.status}).

Error message

Failed to load collection access (${response.status}).

What it means

Error "Failed to load collection access (${response.status})." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx:263

    orgWide: Boolean(entry.orgWide),
    role,
    createdAt: asString(entry.createdAt) ?? new Date().toISOString(),
    removedAt: asString(entry.removedAt),
  };
}

export function useMarketplaceAccess(marketplaceId: string | null) {
  return useQuery({
    enabled: Boolean(marketplaceId),
    queryKey: marketplaceQueryKeys.access(marketplaceId ?? "none"),
    queryFn: async (): Promise<MarketplaceAccessGrant[]> => {
      const { response, payload } = await requestJson(
        `/v1/marketplaces/${encodeURIComponent(marketplaceId ?? "")}/access`,
        { method: "GET" },
        15000,
      );
      if (!response.ok) {
        throw new Error(getErrorMessage(payload, `Failed to load collection access (${response.status}).`));
      }

      const items = isRecord(payload) && Array.isArray(payload.items) ? payload.items : [];
      return items
        .map(parseAccessGrant)
        .filter((value): value is MarketplaceAccessGrant => Boolean(value) && value?.removedAt === null);
    },
  });
}

export function useGrantMarketplaceAccess() {
  const queryClient = useQueryClient();
  const { runReauthableAction } = useOrgDashboard();

  return useMutation({
    mutationFn: async (input: {
      marketplaceId: string;
      body:

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx:263 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/b4ee88e81f9c1837. Report an issue: GitHub.