santifer/career-ops · error · Error

a16z-speedrun-talent: invalid URL: ${url}

Error message

a16z-speedrun-talent: invalid URL: ${url}

What it means

The a16z-speedrun-talent provider validates its feed URL via assertFeedUrl(). This first guard throws if `new URL(url)` fails — i.e. the URL string is malformed (empty, no protocol, embedded illegal characters). It is the parse step before the protocol and hostname checks.

Source

Thrown at providers/a16z-speedrun-talent.mjs:44

const FEED_BASE = 'https://speedrun-talent-network.com/api/v1/jobs';
const TRUSTED_HOST = 'speedrun-talent-network.com';
const PER_PAGE = 50;
const DEFAULT_MAX_PAGES = 6; // × PER_PAGE = the 300-job default scan
// Runaway bound, not a coverage target: iteration already stops at the
// feed's reported total_pages (or a short page), so on an honest feed the
// cap costs nothing and full-board sweeps keep working as the board grows.
// It only bites a misbehaving feed or an absurd max_pages entry — so it
// sits well above plausible board size (~353 pages / ~17.6k jobs as of
// 2026-08), same policy as workday.mjs's cap.
const MAX_PAGES_CAP = 1000;

/** @param {string} url */
function assertFeedUrl(url) {
  let parsed;
  try {
    parsed = new URL(url);
  } catch {
    throw new Error(`a16z-speedrun-talent: invalid URL: ${url}`);
  }
  if (parsed.protocol !== 'https:') throw new Error(`a16z-speedrun-talent: URL must use HTTPS: ${url}`);
  if (parsed.hostname !== TRUSTED_HOST) {
    throw new Error(`a16z-speedrun-talent: untrusted hostname "${parsed.hostname}" — must be ${TRUSTED_HOST}`);
  }
  return url;
}

/** Resolve the page cap: a positive integer `max_pages` on the entry, capped. */
function resolveMaxPages(entry) {
  const v = entry?.max_pages;
  if (Number.isInteger(v) && v > 0) return Math.min(v, MAX_PAGES_CAP);
  return DEFAULT_MAX_PAGES;
}

/** Optional server-side query: `q:` on the entry, else joined `keywords:`. */
function resolveQuery(entry) {
  if (typeof entry?.q === 'string' && entry.q.trim()) return entry.q.trim();

View on GitHub (pinned to 9b17a8ac97)

Solutions

  1. Inspect FEED_BASE at the top of providers/a16z-speedrun-talent.mjs — it must be a complete absolute URL (e.g. 'https://speedrun.a16z.com/api/talent').
  2. Ensure any entry URL override is a valid absolute https URL.

Example fix

// before
const FEED_BASE = 'speedrun.a16z.com/api/talent';

// after
const FEED_BASE = 'https://speedrun.a16z.com/api/talent';
Defensive patterns

Strategy: validation

Validate before calling

function assertValidUrl(url) {
  try { new URL(url); return true; } catch { return false; }
}
if (!assertValidUrl(FEED_BASE)) throw new Error('a16z FEED_BASE is not a valid URL');

Type guard

/** @param {unknown} u @returns {u is string} */
function isValidUrlString(u) {
  if (typeof u !== 'string' || u.length === 0) return false;
  try { new URL(u); return true; } catch { return false; }
}

Try / catch

try { assertFeedUrl(url); } catch (err) {
  if (/invalid URL/.test(err.message)) console.error('a16z FEED_BASE malformed — fix it.');
  throw err;
}

Prevention

When it happens

Trigger: FEED_BASE (compiled-in feed constant) or a supplied URL fails URL parsing: empty string, 'speedrun.a16z.com/talent' with no scheme, undefined coerced to a string, control characters. Since FEED_BASE is a trusted constant, this most often signals a bad edit to that constant or a malformed test entry.

Common situations: FEED_BASE edited to drop the https:// scheme; a copy-paste of a partial URL.

Related errors


AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13). Data as JSON: /api/errors/7ce2acb340c123aa. Report an issue: GitHub.