santifer/career-ops · error · Error
weworkremotely: URL must use HTTPS
Error message
weworkremotely: URL must use HTTPS: ${url} What it means
The weworkremotely provider only talks to the public HTTPS RSS feed at weworkremotely.com. After the URL parses, assertWwrUrl requires parsed.protocol to be exactly 'https:'; any other scheme (typically http:) is rejected with this error. This guarantees TLS for feed fetches and blocks insecure downgrades of a misconfigured URL.
Solutions
- Change the scheme to https:// in the configured URL
- Prefer the provider's built-in FEED_URL (https://weworkremotely.com/remote-jobs.rss) instead of overriding the URL in config
- Add a pre-check in tooling that writes portals.yml: new URL(u).protocol === 'https:'
Example fix
// before careers_url: http://weworkremotely.com/remote-jobs.rss // after careers_url: https://weworkremotely.com/remote-jobs.rss
Defensive patterns
Strategy: validation
Validate before calling
const isHttps = (url) => { try { return new URL(url).protocol === 'https:'; } catch { return false; } };
// pre-check: isHttps(entry.careers_url) Type guard
const isHttpsUrl = (u) => { try { return new URL(u).protocol === 'https:'; } catch { return false; } }; Try / catch
try {
await wwrProvider.fetch(entry, ctx);
} catch (err) {
if (err.message.startsWith('weworkremotely: URL must use HTTPS')) {
console.error(`${entry.name}: switch the feed URL to https:// — ${err.message}`);
return;
}
throw err;
} Prevention
- Store only https:// URLs in portals.yml; audit existing entries with a one-line script
- Use the provider's built-in FEED_URL instead of custom careers_url values
- Add a config-load lint that rejects non-https URLs for all providers
When it happens
Trigger: A portals.yml job_boards entry or caller supplies 'http://weworkremotely.com/remote-jobs.rss' (or any non-https scheme). The URL parses cleanly, so the invalid-URL branch is passed; only the protocol check throws.
Common situations: Typing the feed URL from memory and omitting the 's', following an http redirect link found on an old page, config generators that default to http://, copy-paste from a browser address bar after a downgrade.
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
- itviec: URL must use HTTPS
- remotli: URL must use HTTPS
- torre: URL must use HTTPS
- a16z-speedrun-talent: URL must use HTTPS
- agentic-jobs: URL must use HTTPS
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/0ed4d61a87d55a0d.
Report an issue: GitHub.
Appendix: source
Thrown at providers/weworkremotely.mjs:23
// We Work Remotely provider - board-wide RSS feed
// (https://weworkremotely.com/remote-jobs.rss). The feed is public, no-auth,
// and XML, so it is parsed in-process with the same tiny tag extractor approach
// as providers/personio.mjs rather than adding an XML dependency.
//
// Wire in via a `job_boards:` entry with `provider: weworkremotely`.
const FEED_URL = 'https://weworkremotely.com/remote-jobs.rss';
const TRUSTED_HOST = 'weworkremotely.com';
/** @param {string} url */
function assertWwrUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`weworkremotely: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`weworkremotely: URL must use HTTPS: ${url}`);
if (parsed.hostname !== TRUSTED_HOST) {
throw new Error(`weworkremotely: 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() : 'We Work Remotely';
}
/** @type {Provider} */View on GitHub (pinned to aac998c7ed)