jackwener/OpenCLI · warning · EmptyResultError

LinkedIn Learning returned no personalized recommendations

Error message

LinkedIn Learning returned no personalized recommendations

What it means

EmptyResultError signaling that the LinkedIn Learning feedRecommendationGroups response yielded zero cards at all (sawCards false). It is a distinct, softer condition from the parse failure: LinkedIn responded fine but contained no personalized recommendation rows within the fetch limits.

Source

Thrown at clis/linkedin-learning/trending.js:79

                    sawCards = true;
                    if (rows.length >= limit) break;
                    const slug = card?.slug;
                    if (!slug || seen.has(slug)) continue;
                    seen.add(slug);
                    const row = parseCard(card, carousel, rank);
                    if (!row) continue;
                    rows.push(row);
                    rank += 1;
                }
                if (rows.length >= limit) break;
            }
            if (rows.length >= limit) break;
        }
        if (rows.length === 0) {
            if (sawCards) {
                throw new CommandExecutionError('LinkedIn Learning feedRecommendationGroups returned no parseable cards with slug identity');
            }
            throw new EmptyResultError('LinkedIn Learning returned no personalized recommendations');
        }
        return rows;
    },
});

export const __test__ = { parseCard };

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Authenticate the linkedin.com session (li_at cookie) and retry.
  2. Browse some LinkedIn Learning courses in the browser to seed recommendations, then rerun.
  3. Treat as legitimately empty data in your automation (handle EmptyResultError as a no-op).

Example fix

try {
  const rows = await run('linkedin-learning trending');
} catch (e) {
  if (e.name === 'EmptyResultError') return []; // no recommendations yet
  throw e;
}
Defensive patterns

Strategy: fallback

Validate before calling

null

Type guard

null

Try / catch

try {
  return await run('linkedin-learning trending');
} catch (e) {
  if (e.name === 'EmptyResultError') return [];
  throw e;
}

Prevention

When it happens

Trigger: Calling the linkedin-learning trending command when every recommendation group iterated is empty or absent, so rows.length === 0 and no card was ever seen.

Common situations: Brand-new or inactive LinkedIn Learning account with no recommendations yet; logged-out or throttled session returning skeleton pages; region where the feed component is not served.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/88f1d1b044a2ca70. Report an issue: GitHub.