santifer/career-ops · error · Error
yourator: URL must use HTTPS
Error message
yourator: URL must use HTTPS: ${url} What it means
assertYouratorUrl requires the parsed URL's protocol to be exactly https:. After a successful parse, any http: (or other scheme like ftp:, file:) URL throws this error. The provider enforces HTTPS to guarantee transport security for every request it issues against the Yourator API.
Solutions
- Change the configured URL to use https:// explicitly
- If the value comes from user input or config, normalize http:// → https:// at load time
- Keep the guard: do not weaken the check; use it as validation feedback to fix the source value
- Check any code building URLs via string concatenation for scheme mistakes
Example fix
// before const url = 'http://yourator.net/en/companies/acme'; // after const url = 'https://yourator.net/en/companies/acme';
Defensive patterns
Strategy: validation
Validate before calling
const u = new URL(candidateUrl);
if (u.protocol !== 'https:') {
throw new Error(`yourator URL must be https, got ${u.protocol}`);
} Type guard
function isHttpsUrl(s) {
try { return new URL(s).protocol === 'https:'; } catch { return false; }
} Try / catch
try {
await scanYourator(entry);
} catch (e) {
if (e.message.startsWith('yourator: URL must use HTTPS')) {
console.warn('Upgrade the configured URL to https:// — plain http is rejected by design.');
} else throw e;
} Prevention
- Always write https:// explicitly in portals.yml and documentation
- Normalize legacy http:// values to https:// at config load time
- Never accept HTTP downgrade for scraping endpoints
- Note the guard exists for transport security — don't bypass it, fix the source
When it happens
Trigger: A portals.yml entry or caller supplies an 'http://yourator.net/...' URL, or a scheme-less string that happened to parse (rare, e.g. 'https:yourator' variants) with a non-https protocol, or a custom scheme like file://.
Common situations: Old bookmarks or internal notes still pointing at http; hand-written config defaulting to http; redirect targets or user-supplied links downgraded to http; concatenation bugs producing 'httpss://' style typos.
Understand the failure class
Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.
Related errors
- 4dayweek: URL must use HTTPS
- arbeitnow: URL must use HTTPS
- eightfold: URL must use HTTPS
- justjoin: URL must use HTTPS
- manfred: URL must use HTTPS
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/c7c1cf3c6a0c43e4.
Report an issue: GitHub.
Appendix: source
Thrown at providers/yourator.mjs:83
const SITE_ORIGIN = 'https://www.yourator.co';
const FEED_BASE = `${SITE_ORIGIN}/api/v4/jobs`;
const TRUSTED_HOST = 'www.yourator.co';
// Safety bound only — the loop stops on payload.hasMore. The live board was 88
// pages on 2026-08-18; this leaves room to grow without silently truncating.
const DEFAULT_MAX_PAGES = 120;
const MAX_PAGES_CAP = 500;
const PAGE_DELAY_MS = 200;
/** @param {string} url */
function assertYouratorUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`yourator: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`yourator: URL must use HTTPS: ${url}`);
if (parsed.hostname !== TRUSTED_HOST) {
throw new Error(`yourator: 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;
}
/**
* Canonical URL for a posting — Source Indexing Policy rule 2, "the shortest
* verifiable path to the employer the source exposes".
*
* Prefers `thirdPartyUrl` (the employer's own ATS page), with the board'sView on GitHub (pinned to aac998c7ed)