santifer/career-ops · error · Error
rippling: URL must use HTTPS
Error message
rippling: URL must use HTTPS: ${url} What it means
assertRipplingApiUrl rejects any rippling API URL whose protocol is not https:. This enforces encrypted transport and blocks non-HTTP schemes from reaching the fetch layer, complementing the hostname pin to the Rippling API host.
Solutions
- Switch the URL to https:// (e.g. https://api.rippling.com/...).
- Fix any URL-building code to hardcode the https scheme.
- If testing against a local HTTP mock, mock at the fetch layer instead of changing the validated URL.
Example fix
// before
const apiUrl = `http://${API_HOST}/jobs`;
// after
const apiUrl = `https://${API_HOST}/jobs`; Defensive patterns
Strategy: validation
Validate before calling
const isHttps = (u) => { try { return new URL(u).protocol === 'https:'; } catch { return false; } };
if (!isHttps(entry.url)) console.warn(`${entry.name}: upgrade to https://`); Type guard
const isHttpsUrl = (u) => { try { return new URL(u).protocol === 'https:'; } catch { return false; } }; Try / catch
try { await provider.fetch(entry, ctx); } catch (e) { if (e.message.includes('must use HTTPS')) { console.warn(`Use https:// for ${entry.name}`); return null; } throw e; } Prevention
- Hardcode the https scheme in URL builders.
- Config-lint for http:// values.
- Use https-only mocks in tests.
When it happens
Trigger: Supplying a URL like http://api.rippling.com/... or any parsed non-https scheme (file:, ftp:) to the rippling provider — typically from a config entry or URL builder that didn't force HTTPS.
Common situations: Local development overrides using http://localhost proxies, legacy config with http://, or string concatenation that swapped the scheme.
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
- a16z-speedrun-talent: URL must use HTTPS
- agentic-jobs: URL must use HTTPS
- collage: URL must use HTTPS
- getonbrd: URL must use HTTPS
- glints: URL must use HTTPS
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/da8cdf19ba3c999f.
Report an issue: GitHub.
Appendix: source
Thrown at providers/rippling.mjs:56
const segment = parsed.pathname.split('/').filter(Boolean)[0] || '';
if (!SLUG_RE.test(segment)) return null;
return segment;
}
/** Build the board API URL for a validated slug. */
function apiUrlForSlug(slug) {
return `${API_BASE}/${encodeURIComponent(slug)}/jobs`;
}
/** @param {string} url */
function assertRipplingApiUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`rippling: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`rippling: URL must use HTTPS: ${url}`);
if (parsed.hostname !== API_HOST) {
throw new Error(`rippling: untrusted hostname "${parsed.hostname}" — must be ${API_HOST}`);
}
return url;
}
/** @type {Provider} */
export default {
id: 'rippling',
detect(entry) {
const slug = resolveSlug(entry);
return slug ? { url: apiUrlForSlug(slug) } : null;
},
async fetch(entry, ctx) {
const slug = resolveSlug(entry);
if (!slug) throw new Error(`rippling: cannot derive API URL for ${entry.name}`);View on GitHub (pinned to aac998c7ed)