{"record":{"id":"89452519124a1905","repo":"different-ai/openwork","slug":"mcp-catalog-cursor-size-limit","errorCode":"MCP_CATALOG_CURSOR_SIZE_LIMIT","errorMessage":"MCP_CATALOG_CURSOR_SIZE_LIMIT","messagePattern":"MCP_CATALOG_CURSOR_SIZE_LIMIT","errorType":"error_code","errorClass":"EnterpriseMcpCatalogError","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/resource-catalog.ts","lineNumber":64,"sourceCode":"    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\n  throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_PAGE_LIMIT\")\n}\n\nexport function collectEnterpriseMcpResources(input: {\n  listPage: (cursor: string | undefined, options: RequestOptions) => Promise<ResourcePage>\n  requestOptions: RequestOptions\n}) {\n  return collectPages({\n    requestOptions: input.requestOptions,\n    listPage: async (cursor, options) => {\n      const result = await input.listPage(cursor, options)\n      return { items: result.resources, nextCursor: result.nextCursor }","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/resource-catalog.ts#L46-L82","documentation":"Error \"MCP_CATALOG_CURSOR_SIZE_LIMIT\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/resource-catalog.ts:64 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"}