{"record":{"id":"1c523189069c32ec","repo":"jackwener/OpenCLI","slug":"no-map-pool-rows-found-for-team-teamid-slug","errorCode":null,"errorMessage":"No map-pool rows found for team ${teamId}/${slug}","messagePattern":"No map-pool rows found for team (.+?)/(.+?)","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/hltv/team-map-pool.js","lineNumber":92,"sourceCode":"          category: 'map',\n          key: mapName,\n          teamId: payload.teamId,\n          team,\n          record,\n          winRate,\n          totalRounds,\n          firstKillWinPct,\n          firstDeathWinPct,\n          pickPct,\n          banPct,\n          mapUrl: byMap.get(mapName)?.mapUrl ?? null,\n        });\n      }\n      return [...byMap.values()];\n    }, { base: BASE, teamId, slug });\n\n    if (!Array.isArray(rawRows)) throw new CommandExecutionError('hltv team-map-pool parser returned an unexpected shape');\n    if (rawRows.length === 0) throw new EmptyResultError('hltv team-map-pool', `No map-pool rows found for team ${teamId}/${slug}`);\n\n    const rows = rawRows.map((row) => {\n      const record = splitRecord(row.record);\n      const maps = record.wins === null ? null : (record.wins ?? 0) + (record.draws ?? 0) + (record.losses ?? 0);\n      return {\n        category: row.category,\n        key: row.key,\n        teamId: row.teamId,\n        team: row.team,\n        maps,\n        winMaps: record.wins,\n        lossMaps: record.losses,\n        winRatePct: parseNumber(row.winRate),\n        avgRoundDiff: null,\n        details: {\n          draws: record.draws,\n          totalRounds: parseNumber(row.totalRounds),\n          roundsPerMap: maps ? round(parseNumber(row.totalRounds) / maps) : null,","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/hltv/team-map-pool.js#L74-L110","documentation":"After a successful parse, team-map-pool throws this EmptyResultError when the parsed row array is empty, meaning HLTV returned no map-pool statistics for the given team. The team exists but has no map records in the analyzed pool/window.","triggerScenarios":"Calling with a teamId/slug of a team with no recorded map stats (new, inactive, or academy team); team page exists but the maps section is empty; wrong teamId/slug combo resolving to a page without map-pool data.","commonSituations":"Querying a newly formed roster with no official maps; dead/inactive team pages; mixing a teamId from one team with a slug from another so the page has no data; regional teams with sparse HLTV coverage.","solutions":["Verify teamId and slug refer to the same, active team on HLTV","Confirm the team's HLTV page shows map statistics manually","Try a different/active team to validate the call path","Catch EmptyResultError and report 'no map-pool data for this team'"],"exampleFix":"// before\nawait teamMapPool(page, { teamId: 12345, slug: 'wrong-slug' });\n// after\nawait teamMapPool(page, { teamId: 12345, slug: 'correct-slug' }); // id and slug from the same team page","handlingStrategy":"try-catch","validationCode":"// confirm the team page has map stats before invoking\nconst teamUrl = `https://www.hltv.org/team/${teamId}/${slug}`;\n// fetch teamUrl and ensure the stats/maps section exists","typeGuard":"function isTeamRef(t) { return Number.isFinite(t?.teamId) && typeof t?.slug === 'string' && t.slug.length > 0; }","tryCatchPattern":"try {\n  const pool = await teamMapPool(page, { teamId, slug });\n} catch (err) {\n  if (err instanceof EmptyResultError) return { rows: [], note: 'no map-pool data for this team' };\n  throw err;\n}","preventionTips":["Verify teamId and slug come from the same team page","Skip known-empty targets (new rosters, inactive/academy teams)","Manually confirm the team page shows map statistics when debugging","Treat 'no map-pool data' as a valid domain answer"],"tags":["hltv","empty-result","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}