{"record":{"id":"7699dec062543482","repo":"jackwener/OpenCLI","slug":"no-player-match-rows-matched-team-teamref-teamid","errorCode":null,"errorMessage":"No player match rows matched team ${teamRef.teamId}/${teamRef.slug}","messagePattern":"No player match rows matched team (.+?)/(.+?)","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/hltv/player-vs-team.js","lineNumber":75,"sourceCode":"    { name: 'period', type: 'string', default: 'all', help: 'all / lastMonth / last3Months / last6Months / last12Months / YYYY / YYYY-MM-DD:YYYY-MM-DD' },\n    { name: 'eventType', type: 'string', default: 'all', help: 'all / majors / bigEvents / mvpEvents / lan / online' },\n    { name: 'event', type: 'string', default: 'all', help: 'all / event id / /events/:id URL / stats URL with event=' },\n    { name: 'ranking', type: 'string', default: 'all', help: 'all / top5 / top10 / top20 / top30 / top50' },\n    { name: 'map', type: 'string', default: 'all', help: 'all / ancient / anubis / dust2 / inferno / mirage / nuke / overpass / cache / cobblestone / season / train / tuscan / vertigo' },\n    { name: 'version', type: 'string', default: 'both', help: 'both / cs2 / csgo' },\n    { name: 'offset', type: 'int', default: 0, help: 'Pagination offset; must be a multiple of 100' },\n    { name: 'limit', type: 'int', default: 100, help: 'Rows to scan from the current page (max 100)' },\n  ],\n  columns: ['rowType', 'rank', 'date', 'playerId', 'opponent', 'map', 'kills', 'deaths', 'rating', 'result', 'matchStatsId', 'details'],\n  func: async (page, args) => {\n    const limit = normalizeLimit(args.limit, 100, 100);\n    const teamRef = parseTeamRef(args.team);\n    const wanted = norm(teamRef.slug);\n    const rows = (await readPlayerMatches(page, args, limit)).filter((row) => {\n      return norm(row.opponent).includes(wanted) || wanted.includes(norm(row.opponent));\n    });\n    if (rows.length === 0) {\n      throw new EmptyResultError('hltv player-vs-team', `No player match rows matched team ${teamRef.teamId}/${teamRef.slug}`);\n    }\n    return [\n      summarize(rows, teamRef),\n      ...rows.map((row) => ({\n        rowType: 'map',\n        rank: row.rank,\n        date: row.date,\n        playerId: row.playerId,\n        opponent: row.opponent,\n        map: row.map,\n        kills: row.kills,\n        deaths: row.deaths,\n        rating: row.rating,\n        result: row.details?.result ?? null,\n        matchStatsId: row.matchStatsId,\n        details: row.details,\n      })),\n    ];","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/hltv/player-vs-team.js#L57-L93","documentation":"player-vs-team filters the player's match rows by fuzzy team-name match against the parsed team ref. It throws this EmptyResultError when no row's opponent name matches the wanted team slug. The library requires at least one map row against that team to build the summary.","triggerScenarios":"Calling with a team the player never faced in the analyzed window; slug normalization mismatch (team renamed, slug differs from opponent string in rows); limit too small to reach any meeting; wrong teamId/slug in the team ref.","commonSituations":"Querying an old team name after rebrand (slug no longer matches opponent text); player transferred so recent rows have no games vs that team; typos in the team slug argument.","solutions":["Increase the limit to cover more of the player's match history","Check the team slug matches HLTV's current name for the team (renames break matching)","Verify the player has actually played against this team recently","Catch EmptyResultError and treat 'never faced this team' as a valid result"],"exampleFix":"// before\nconst rows = await playerVsTeam(page, { player, team: 'old-team-name', limit: 10 });\n// after\nconst rows = await playerVsTeam(page, { player, team: 'new-team-name', limit: 100 }); // updated slug + bigger window","handlingStrategy":"validation","validationCode":"// normalize the team slug the same way the library does before calling\nconst slug = teamRef.split('/').pop().toLowerCase();\nif (!slug) throw new Error('team ref must include a slug');","typeGuard":"function isTeamRef(ref) { return typeof ref === 'string' && /^\\d+\\/[\\w-]+$/.test(ref); }","tryCatchPattern":"try {\n  const out = await playerVsTeam(page, args);\n} catch (err) {\n  if (err instanceof EmptyResultError) return { matches: [], note: 'player never faced this team in window' };\n  throw err;\n}","preventionTips":["Use HLTV's current team slug — renames break name matching","Increase the history limit to reach older meetings","Sanity-check the player has played the team before deep-diving","Remember matching is fuzzy substring-based; exotic names may not match"],"tags":["hltv","empty-result","name-matching"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}