{"record":{"id":"6adaf91448ba7ff7","repo":"paperclipai/paperclip","slug":"catalog-team-asset-previews-are-not-supported","errorCode":null,"errorMessage":"Catalog team asset previews are not supported.","messagePattern":"Catalog team asset previews are not supported\\.","errorType":"http","errorClass":"HttpError","httpStatus":415,"severity":"error","filePath":"server/src/services/teams-catalog.ts","lineNumber":337,"sourceCode":"\n  const teamRoot = catalogTeamRoot(team);\n  const absolutePath = path.resolve(teamRoot, normalizedPath);\n  if (absolutePath !== teamRoot && !absolutePath.startsWith(`${teamRoot}${path.sep}`)) {\n    throw notFound(\"Catalog team file not found\");\n  }\n\n  return { normalizedPath, fileEntry, absolutePath };\n}\n\nexport async function readCatalogTeamFile(\n  reference: string,\n  relativePath = \"TEAM.md\",\n): Promise<CatalogTeamFileDetail> {\n  const team = await getCatalogTeamOrThrow(reference);\n  const resolved = resolveCatalogTeamFile(team, relativePath);\n\n  if (resolved.fileEntry.kind === \"asset\") {\n    throw new HttpError(415, \"Catalog team asset previews are not supported.\");\n  }\n\n  const content = await fs.readFile(resolved.absolutePath, \"utf8\");\n  return {\n    catalogTeamId: team.id,\n    path: resolved.normalizedPath,\n    kind: resolved.fileEntry.kind,\n    content,\n    language: inferLanguageFromPath(resolved.normalizedPath),\n    markdown: isMarkdownPath(resolved.normalizedPath),\n  };\n}\n\nfunction yamlScalar(value: string | number | boolean | null) {\n  if (value === null) return \"null\";\n  if (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n  return JSON.stringify(value);\n}","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/teams-catalog.ts#L319-L355","documentation":"Content-type guard in readCatalogTeamFile: the requested team file's manifest entry has kind asset, and this endpoint only serves text content (TEAM.md and friends). Asset previews are unsupported; the asset path requested is at fault.","triggerScenarios":"Thrown at server/src/services/teams-catalog.ts:337 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Team asset previews are not implemented; fetch the asset content directly instead of requesting a preview."],"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-14T00:17:10.932Z"}