santifer/career-ops · error · Error

jobvite: invalid URL

Error message

jobvite: invalid URL: ${url}

What it means

The jobvite provider's assertJobviteHost() validates URLs before fetching. When the input cannot be parsed by the URL constructor at all (malformed, empty, missing scheme), it throws 'jobvite: invalid URL'. This runs before the HTTPS and hostname checks, so it is the first-line guard on any board or feed URL.

Solutions

  1. Correct the URL in portals.yml to an absolute URL, e.g. https://jobs.boardcx.com/<company> or https://jobs.jobvite.com/<company>.
  2. For feed URLs, use the full https:// feed host with the ?c=<companyEid> query parameter intact.
  3. Prefer setting company_eid: so the provider builds a valid URL itself instead of parsing a hand-written one.

Example fix

// before (portals.yml)
provider: jobvite
careers_url: jobs.jobvite.com/acme
// after
provider: jobvite
careers_url: https://jobs.jobvite.com/acme
Defensive patterns

Strategy: validation

Validate before calling

let u; try { u = new URL(entry.careers_url); } catch { throw new Error(`jobvite entry ${entry.name} has an unparseable URL`); }

Type guard

const isParseableUrl = (s) => { try { new URL(s); return true; } catch { return false; } };

Try / catch

try {
  await provider.fetch(entry, ctx);
} catch (e) {
  if (e.message.includes('jobvite: invalid URL')) {
    entry.careers_url = `https://jobs.jobvite.com/${entry.slug}`;
  }
}

Prevention

When it happens

Trigger: A portals.yml jobvite entry whose `careers_url`/`api:` value is empty, missing the scheme (jobs.boardcx.com/...), contains spaces, or is otherwise not an absolute URL.

Common situations: Leaving the api: value blank; pasting a relative path from a Jobvite admin page; YAML quoting issues that truncate the URL; typos like 'htp://'.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16). Data as JSON: /api/errors/771fb968851f7b53. Report an issue: GitHub.

Appendix: source

Thrown at providers/jobvite.mjs:103

// The XML feed inlines every job's FULL HTML description, so it is large and
// slow by construction rather than occasionally: Tyler Technologies returns
// 1.88 MB for 236 jobs in ~11s. That overshoots the shared 10s default in
// _http.mjs by a second, which aborted the whole tenant and reported it as a
// network failure. Sized to absorb a genuinely big tenant on a slow link; the
// board page (a normal HTML document) keeps the default.
const FEED_TIMEOUT_MS = 45_000;

/**
 * Pin a URL to the two known Jobvite hosts over HTTPS.
 * @param {string} url
 */
function assertJobviteHost(url) {
  let parsed;
  try {
    parsed = new URL(url);
  } catch {
    throw new Error(`jobvite: invalid URL: ${url}`);
  }
  if (parsed.protocol !== 'https:')
    throw new Error(`jobvite: URL must use HTTPS: ${url}`);
  if (!ALLOWED_HOSTS.has(parsed.hostname))
    throw new Error(`jobvite: untrusted hostname "${parsed.hostname}" — must be ${BOARD_HOST} or ${FEED_HOST}`);
  return url;
}

// NaN-safe Date.parse → epoch ms.
/** @param {string} value */
function toEpochMs(value) {
  if (!value) return undefined;
  const parsed = Date.parse(value);
  return Number.isNaN(parsed) ? undefined : parsed;
}

/**
 * The vanity slug from a Jobvite careers URL, or null.

View on GitHub (pinned to aac998c7ed)