{"record":{"id":"027d3aced4be8942","repo":"different-ai/openwork","slug":"failed-to-load-collections-response-status","errorCode":null,"errorMessage":"Failed to load collections (${response.status}).","messagePattern":"Failed to load collections \\((.+?)\\)\\.","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx","lineNumber":416,"sourceCode":"    },\n    onSuccess: () => {\n      queryClient.invalidateQueries({ queryKey: marketplaceQueryKeys.all });\n      queryClient.invalidateQueries({ queryKey: mcpConnectionQueryKeys.all });\n    },\n  });\n}\n\nexport function useMarketplaces() {\n  return useQuery({\n    queryKey: marketplaceQueryKeys.list(),\n    queryFn: async () => {\n      const { response, payload } = await requestJson(\n        \"/v1/marketplaces?status=active&limit=100\",\n        { method: \"GET\" },\n        15000,\n      );\n      if (!response.ok) {\n        throw new Error(getErrorMessage(payload, `Failed to load collections (${response.status}).`));\n      }\n\n      const items = isRecord(payload) && Array.isArray(payload.items) ? payload.items : [];\n      return items\n        .map(parseMarketplace)\n        .filter((value): value is DenMarketplace => Boolean(value));\n    },\n  });\n}\n\nexport function useCreateMarketplace() {\n  const queryClient = useQueryClient();\n  const { runReauthableAction } = useOrgDashboard();\n\n  return useMutation({\n    mutationFn: async (input: { name: string; description?: string }): Promise<DenMarketplace> => {\n      let created: DenMarketplace | null = null;\n      await runReauthableAction(\"create-marketplace\", async () => {","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx#L398-L434","documentation":"Error \"Failed to load collections (${response.status}).\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}