santifer/career-ops · error · Error
larajobs: URL must use HTTPS: ${url}
Error message
larajobs: URL must use HTTPS: ${url} What it means
After the URL parses successfully, assertLarajobsUrl verifies parsed.protocol === 'https:'. Any other scheme (http:, ftp:, file:, javascript:) triggers this error. It enforces transport encryption before the feed is fetched.
Source
Thrown at providers/larajobs.mjs:26
//
// Each <item> carries the standard RSS fields plus a `job:` namespace with
// `<job:company>` and `<job:location>`, so company and location come straight
// from the feed (no title-splitting heuristics needed).
//
// Wire in via a `job_boards:` entry with `provider: larajobs`.
const FEED_URL = 'https://larajobs.com/feed';
const TRUSTED_HOST = 'larajobs.com';
/** @param {string} url */
function assertLarajobsUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`larajobs: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`larajobs: URL must use HTTPS: ${url}`);
if (parsed.hostname !== TRUSTED_HOST) {
throw new Error(`larajobs: untrusted hostname "${parsed.hostname}" - must be ${TRUSTED_HOST}`);
}
return url;
}
// NaN-safe Date.parse - `|| undefined` would also coerce a valid epoch 0.
function toEpochMs(value) {
if (!value) return undefined;
const parsed = Date.parse(value);
return Number.isNaN(parsed) ? undefined : parsed;
}
function fallbackCompany(entry) {
return typeof entry?.name === 'string' && entry.name.trim() ? entry.name.trim() : 'LaraJobs';
}
/** @type {Provider} */View on GitHub (pinned to 9b17a8ac97)
Solutions
- Change the scheme in the offending URL to https://.
- Confirm the HTTPS endpoint actually serves the feed (curl https://larajobs.com/feed).
- If you genuinely need HTTP (test fixture), point it at a local mock over HTTPS instead.
Example fix
// before api: http://larajobs.com/feed // after api: https://larajobs.com/feed
Defensive patterns
Strategy: validation
Validate before calling
import { URL } from 'node:url';
export function isHttpsUrl(value) {
try { return new URL(value).protocol === 'https:'; } catch { return false; }
}
// if (!isHttpsUrl(entry.api)) failConfig('larajobs api must be HTTPS'); Type guard
/** @param {string} url */
function isHttps(url) {
try { return new URL(url).protocol === 'https:'; } catch { return false; }
} Try / catch
try {
assertLarajobsUrl(url);
} catch (err) {
if (err.message.includes('HTTPS')) console.warn(`refusing non-HTTPS larajobs URL: ${url}`);
throw err;
} Prevention
- Default all feed URLs to https:// in config templates and examples.
- Add a config lint rule that rejects http:// for any larajobs entry.
- Never construct larajobs URLs from user input without forcing the https scheme.
When it happens
Trigger: The URL string begins with http:// (plain HTTP), ftp://, file://, or any non-https scheme. Most commonly an http:// URL was configured for a feed that must be fetched over TLS.
Common situations: An old portals.yml entry still uses http://; a URL was copied from a non-TLS mirror; the feed was migrated to HTTPS but a stale config wasn't updated.
Related errors
- lever: URL must use HTTPS: ${url}
- manfred: URL must use HTTPS: ${url}
- arbeitnow: URL must use HTTPS: ${url}
- ashby: URL must use HTTPS: ${url}
- bamboohr: URL must use HTTPS: ${url}
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/b9b8a05244f6747d.
Report an issue: GitHub.