{"record":{"id":"f4ae70d1d073f366","repo":"different-ai/openwork","slug":"mcp-catalog-duplicate-resource","errorCode":"MCP_CATALOG_DUPLICATE_RESOURCE","errorMessage":"MCP_CATALOG_DUPLICATE_RESOURCE","messagePattern":"MCP_CATALOG_DUPLICATE_RESOURCE","errorType":"error_code","errorClass":"EnterpriseMcpCatalogError","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/resource-catalog.ts","lineNumber":52,"sourceCode":"    items: T[]\n    nextCursor?: string\n  }>\n  requestOptions: RequestOptions\n}): Promise<T[]> {\n  const items: T[] = []\n  const identifiers = new Set<string>()\n  const cursors = new Set<string>()\n  let cursor: string | undefined\n  let catalogBytes = 0\n\n  for (let page = 0; page < ENTERPRISE_MCP_RESOURCE_PAGE_LIMIT; page += 1) {\n    const result = await input.listPage(cursor, input.requestOptions)\n    for (const item of result.items) {\n      if (items.length >= ENTERPRISE_MCP_RESOURCE_ITEM_LIMIT) {\n        throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_ITEM_LIMIT\")\n      }\n      const identifier = item.uri ?? item.uriTemplate ?? \"\"\n      if (identifiers.has(identifier)) throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_DUPLICATE_RESOURCE\")\n      const bytes = assertDescriptor(item)\n      if (catalogBytes + bytes > ENTERPRISE_MCP_RESOURCE_CATALOG_LIMIT_BYTES) {\n        throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_BYTE_LIMIT\")\n      }\n      catalogBytes += bytes\n      identifiers.add(identifier)\n      items.push(item)\n    }\n\n    if (!result.nextCursor) return items\n    if (Buffer.byteLength(result.nextCursor, \"utf8\") > ENTERPRISE_MCP_RESOURCE_URI_LIMIT_BYTES) {\n      throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_CURSOR_SIZE_LIMIT\")\n    }\n    if (cursors.has(result.nextCursor)) throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_CURSOR_LOOP\")\n    cursors.add(result.nextCursor)\n    cursor = result.nextCursor\n  }\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/resource-catalog.ts#L34-L70","documentation":"Error \"MCP_CATALOG_DUPLICATE_RESOURCE\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/resource-catalog.ts:52 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"}