{"record":{"id":"cada643fd16271ba","repo":"different-ai/openwork","slug":"failed-to-load-collection-response-status","errorCode":null,"errorMessage":"Failed to load collection (${response.status}).","messagePattern":"Failed to load collection \\((.+?)\\)\\.","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx","lineNumber":227,"sourceCode":"        branch: asString(sourceRecord.branch),\n      }\n    : null;\n\n  return { marketplace, plugins, source };\n}\n\nexport function useMarketplace(marketplaceId: string | null) {\n  return useQuery({\n    enabled: Boolean(marketplaceId),\n    queryKey: marketplaceQueryKeys.resolved(marketplaceId ?? \"none\"),\n    queryFn: async (): Promise<MarketplaceResolved> => {\n      const { response, payload } = await requestJson(\n        `/v1/marketplaces/${encodeURIComponent(marketplaceId ?? \"\")}/resolved`,\n        { method: \"GET\" },\n        15000,\n      );\n      if (!response.ok) {\n        throw new Error(getErrorMessage(payload, `Failed to load collection (${response.status}).`));\n      }\n\n      return parseMarketplaceResolvedPayload(payload);\n    },\n  });\n}\n\nfunction parseAccessGrant(entry: unknown): MarketplaceAccessGrant | null {\n  if (!isRecord(entry)) return null;\n  const id = asString(entry.id);\n  const role = asString(entry.role);\n  if (!id || !role) return null;\n  if (role !== \"viewer\" && role !== \"editor\" && role !== \"manager\") return null;\n  return {\n    id,\n    orgMembershipId: asString(entry.orgMembershipId),\n    teamId: asString(entry.teamId),\n    orgWide: Boolean(entry.orgWide),","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx#L209-L245","documentation":"Error \"Failed to load collection (${response.status}).\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_components/marketplace-data.tsx:227 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"}