jackwener/OpenCLI · info · EmptyResultError
No pending sent invitations were found.
Error message
No pending sent invitations were found.
What it means
The linkedin sent-invitations command scrapes the page of sent (pending) connection invitations. When the page renders its empty-state (explicitEmpty), meaning LinkedIn itself confirmed there are no pending sent invitations, the command throws EmptyResultError with this message instead of returning zero rows. It signals a legitimate empty result, not a scraping failure.
Source
Thrown at clis/linkedin/sent-invitations.js:110
await page.goto(SENT_URL);
await page.wait(12);
let result = unwrapEvaluateResult(await page.evaluate(buildSentInvitationsScript()));
if (result?.authRequired) {
throw new AuthRequiredError(LINKEDIN_DOMAIN, 'LinkedIn sent invitations requires an active signed-in browser session.');
}
if (result?.warning) {
throw new CommandExecutionError('LinkedIn warning/restriction state visible on sent invitations page.');
}
if (!result || typeof result !== 'object' || Array.isArray(result) || !Array.isArray(result.rows)) {
throw new CommandExecutionError('LinkedIn sent invitations returned a malformed extraction payload.');
}
if (result.malformedCount > 0) {
throw new CommandExecutionError('LinkedIn sent invitations contained a malformed invitation card.');
}
const rows = result.rows;
if (rows.length === 0) {
if (result.explicitEmpty) {
throw new EmptyResultError('linkedin sent-invitations', 'No pending sent invitations were found.');
}
throw new CommandExecutionError('LinkedIn sent invitation cards were not found; the page structure may have changed.');
}
return rows.map((row, index) => ({
rank: index + 1,
name: row.name || '',
profile_url: row.profile_url || '',
invited_date_text: row.invited_date_text || '',
}));
},
});
export const __test__ = {
buildSentInvitationsScript,
};
View on GitHub (pinned to 49907e53dc)
Solutions
- Treat this as an expected empty result: catch EmptyResultError and return an empty dataset instead of alerting.
- Verify on linkedin.com/mynetwork/invitation-manager/sent/ that there really are no pending invitations.
- If invitations should exist, re-authenticate the browser session and re-run to rule out a stale page.
Example fix
// before
try {
const rows = await runCommand('linkedin sent-invitations');
} catch (e) {
console.error(e.message);
}
// after
import { EmptyResultError } from '@jackwener/opencli/errors';
try {
const rows = await runCommand('linkedin sent-invitations');
} catch (e) {
if (e instanceof EmptyResultError) {
const rows = [];
} else throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
const pending = await getPendingInvitationCount(); // from your own state or cache if (pending === 0) return []; // skip the call entirely
Type guard
function isEmptyResultError(e) { return e && e.name === 'EmptyResultError'; } Try / catch
try {
rows = await runCommand('linkedin sent-invitations');
} catch (e) {
if (isEmptyResultError(e)) rows = [];
else throw e;
} Prevention
- Treat EmptyResultError as data, not failure — branch on the error class name.
- Track invitation state locally to avoid scraping when nothing is pending.
- Only alert on CommandExecutionError (structure issues), not EmptyResultError.
When it happens
Trigger: Running `linkedin sent-invitations` while the authenticated account has zero pending sent invitations; result.rows is empty and result.explicitEmpty is true because the scraper detected LinkedIn's empty-state UI.
Common situations: A fresh account that has not invited anyone; all previously sent invitations were accepted, withdrawn, or expired; automation ran right after withdrawing invitations in bulk.
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
- No LinkedIn Services page link was found on the profile.
- LinkedIn did not issue a messengerMessages API request for t
- linkedin timeline
- 1point3acres thread
- 1point3acres user
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/f6345944849e2cc7.
Report an issue: GitHub.