{"record":{"id":"11ab6de6f5e0184d","repo":"jackwener/OpenCLI","slug":"no-shared-map-rows-found-for-playera-playerid-a","errorCode":null,"errorMessage":"No shared map rows found for ${playerA.playerId} and ${playerB.playerId}","messagePattern":"No shared map rows found for (.+?) and (.+?)","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/hltv/player-teammate-impact.js","lineNumber":79,"sourceCode":"    const limit = normalizeLimit(args.limit, 100, 100);\n    const playerA = parsePlayerRef(args.playerA);\n    const playerB = parsePlayerRef(args.playerB);\n    const commonArgs = {\n      period: args.period,\n      eventType: args.eventType,\n      event: args.event,\n      ranking: args.ranking,\n      map: args.map,\n      version: args.version,\n      offset: args.offset,\n    };\n    const aRows = await readPlayerMatches(page, { ...commonArgs, player: args.playerA }, limit);\n    const bRows = await readPlayerMatches(page, { ...commonArgs, player: args.playerB }, limit);\n    const bIds = new Set(bRows.map((row) => row.matchStatsId).filter(Boolean));\n    const withB = aRows.filter((row) => bIds.has(row.matchStatsId));\n    const withoutB = aRows.filter((row) => !bIds.has(row.matchStatsId));\n    if (withB.length === 0) {\n      throw new EmptyResultError('hltv player-teammate-impact', `No shared map rows found for ${playerA.playerId} and ${playerB.playerId}`);\n    }\n    const rows = [\n      summarize('summary', 'withTeammate', withB, playerA),\n      summarize('summary', 'withoutTeammate', withoutB, playerA),\n    ];\n    const byMap = new Map();\n    for (const row of withB) {\n      if (!byMap.has(row.map)) byMap.set(row.map, []);\n      byMap.get(row.map).push(row);\n    }\n    for (const [mapName, mapRows] of [...byMap.entries()].sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0]))) {\n      rows.push(summarize('map', mapName, mapRows, playerA));\n    }\n    return rows;\n  },\n});\n","sourceCodeStart":61,"sourceCodeEnd":96,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/hltv/player-teammate-impact.js#L61-L96","documentation":"player-teammate-impact reads each player's recent match rows and splits playerA's maps into those shared with playerB (by matchStatsId) and those without. If no map row is shared, it throws this EmptyResultError because impact comparison is impossible. Shared rows are required by definition of the command.","triggerScenarios":"Calling with two players who never played together in the analyzed window; limit too small so the overlap period is missed; one player's rows lack matchStatsId so intersection is empty; one player ref points to the wrong or inactive profile.","commonSituations":"Comparing a player with a teammate who joined after the analyzed window; passing a former teammate after a transfer with a small limit; typos in player slugs resolving to different people.","solutions":["Increase the limit so both players' histories overlap in time","Verify both player refs point to the intended active HLTV profiles","Confirm the two players actually were teammates in the covered period","Catch EmptyResultError and report 'no shared maps' as a valid answer"],"exampleFix":"// before\nconst impact = await playerTeammateImpact(page, { playerA, playerB, limit: 20 });\n// after\ntry {\n  const impact = await playerTeammateImpact(page, { playerA, playerB, limit: 100 });\n} catch (err) {\n  if (!(err instanceof EmptyResultError)) throw err;\n  console.log('players never shared a map in the window');\n}","handlingStrategy":"try-catch","validationCode":"// require a big enough history window that teammates overlap\nconst limit = Math.max(args.limit ?? 0, 100);","typeGuard":"function validPlayerRef(p) { return p && Number.isFinite(p.playerId) && typeof p.slug === 'string' && p.slug.length > 0; }","tryCatchPattern":"try {\n  const impact = await playerTeammateImpact(page, args);\n} catch (err) {\n  if (err instanceof EmptyResultError) return { withTeammate: null, withoutTeammate: null };\n  throw err;\n}","preventionTips":["Verify the two players really were teammates during the covered window","Use a limit large enough to span their shared tenure","Validate both player refs before invoking the command","Handle 'never shared a map' as an expected outcome for ex-teammates"],"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"}