paperclipai/paperclip · error · HttpError

Catalog team asset previews are not supported.

Error message

Catalog team asset previews are not supported.

What it means

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.

Source

Thrown at server/src/services/teams-catalog.ts:337

  const teamRoot = catalogTeamRoot(team);
  const absolutePath = path.resolve(teamRoot, normalizedPath);
  if (absolutePath !== teamRoot && !absolutePath.startsWith(`${teamRoot}${path.sep}`)) {
    throw notFound("Catalog team file not found");
  }

  return { normalizedPath, fileEntry, absolutePath };
}

export async function readCatalogTeamFile(
  reference: string,
  relativePath = "TEAM.md",
): Promise<CatalogTeamFileDetail> {
  const team = await getCatalogTeamOrThrow(reference);
  const resolved = resolveCatalogTeamFile(team, relativePath);

  if (resolved.fileEntry.kind === "asset") {
    throw new HttpError(415, "Catalog team asset previews are not supported.");
  }

  const content = await fs.readFile(resolved.absolutePath, "utf8");
  return {
    catalogTeamId: team.id,
    path: resolved.normalizedPath,
    kind: resolved.fileEntry.kind,
    content,
    language: inferLanguageFromPath(resolved.normalizedPath),
    markdown: isMarkdownPath(resolved.normalizedPath),
  };
}

function yamlScalar(value: string | number | boolean | null) {
  if (value === null) return "null";
  if (typeof value === "number" || typeof value === "boolean") return String(value);
  return JSON.stringify(value);
}

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Team asset previews are not implemented; fetch the asset content directly instead of requesting a preview.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/teams-catalog.ts:337 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/6adaf91448ba7ff7. Report an issue: GitHub.