{"record":{"id":"c1214e30f4a87afb","repo":"paperclipai/paperclip","slug":"company-id-is-required","errorCode":null,"errorMessage":"Company ID is required.","messagePattern":"Company ID is required\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/teams.ts","lineNumber":294,"sourceCode":"  slug: string | null;\n  name: string;\n  installedStatus: CatalogTeamInstalledStatus;\n  installedAgentCount: number;\n  catalogAgentCount: number | null;\n  projectCount: number | null;\n  trustLevel: CatalogTeam[\"trustLevel\"] | null;\n  present: boolean;\n  outOfDate: boolean;\n  currentContentHash: string | null;\n  installedOriginHashes: string[];\n}\n\nasync function listCatalogTeamStatusRows(\n  ctx: ResolvedClientContext,\n  opts: TeamListOptions,\n): Promise<CatalogTeamStatusRow[]> {\n  if (!ctx.companyId) {\n    throw new Error(\"Company ID is required.\");\n  }\n\n  const [teams, installed] = await Promise.all([\n    listCatalogTeams(ctx, opts),\n    ctx.api.get<InstalledCatalogTeam[]>(\n      `/api/companies/${encodeURIComponent(ctx.companyId)}/teams/catalog/installed`,\n    ),\n  ]);\n\n  const installedByCatalogId = new Map((installed ?? []).map((row) => [row.catalogId, row]));\n  const rows = teams.map((team) => {\n    const installedTeam = installedByCatalogId.get(team.id);\n    if (installedTeam) {\n      installedByCatalogId.delete(team.id);\n    }\n    return buildCatalogTeamStatusRow(team, installedTeam ?? null);\n  });\n","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/teams.ts#L276-L312","documentation":"listCatalogTeamStatusRows is company-scoped but the resolved context carries no companyId, so neither catalog teams nor installed teams can be listed.","triggerScenarios":"Thrown at cli/src/commands/client/teams.ts:294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --company-id or set PAPERCLIP_COMPANY_ID / a context default companyId."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}