santifer/career-ops · error · Error
oraclecloud: invalid URL
Error message
oraclecloud: invalid URL: ${url} What it means
The oraclecloud provider validates URLs with assertOracleUrl. This error is thrown when the string cannot be parsed by the URL constructor at all — missing scheme, malformed syntax, empty input. It fails before any hostname or protocol checks.
Solutions
- Fix the URL so it is a complete absolute https:// URL
- Trim whitespace and fix YAML quoting/indentation that may truncate the value
- Verify the variable providing the URL is set and non-empty
- Remove entries not meant for the Oracle Cloud provider
Example fix
// before const url = entry.careers_url; // undefined -> 'undefined' string throws assertOracleUrl(url); // after const url = (entry.careers_url || '').trim(); if (!url) return null; assertOracleUrl(url);
Defensive patterns
Strategy: validation
Validate before calling
function isParsableUrl(u) { try { new URL(u); return true; } catch { return false; } }
if (!isParsableUrl(entry.careers_url)) throw new Error(`bad oraclecloud url: ${entry.careers_url}`); Type guard
function isAbsoluteUrl(u) {
if (typeof u !== 'string' || !u.trim()) return false;
try { const p = new URL(u); return !!p.hostname; } catch { return false; }
} Try / catch
try {
useOracle(url);
} catch (e) {
if (String(e.message).startsWith('oraclecloud: invalid URL')) {
log.warn(`Skipping malformed Oracle URL: ${url}`);
return null;
}
throw e;
} Prevention
- Parse-validate all provider URLs once at config load
- Store full https:// URLs for Oracle Fusion tenants, including the full fa.ocs hostname
- Trim and check non-empty every value before passing to the provider
- Add a startup dry-run that lists entries failing URL parsing
When it happens
Trigger: Passing an empty string, a scheme-less host ('mysite.fa.ocs.oraclecloud.com'), or a syntactically broken URL ('https://', 'https:/host') into the oraclecloud provider's detect/fetch path or assertOracleUrl directly.
Common situations: Config entry with a missing or truncated Oracle Fusion careers URL; unset env var interpolated into the entry; YAML quoting/line-wrap mistakes; placeholder not replaced in a template entry.
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
- garena: is not a usable URL segment
- landingjobs: invalid URL
- larajobs: invalid URL
- lever: invalid URL
- nodesk: invalid URL
AI-assisted analysis of santifer/career-ops@e7abd431fc (2026-09-16).
Data as JSON: /api/errors/dd028b5327cb46e7.
Report an issue: GitHub.
Appendix: source
Thrown at providers/oraclecloud.mjs:66
// oraclecloud99.com. No leading zero, at most two digits — a bounded family,
// so this stays a host pin and never becomes a wildcard apex match.
const ORACLE_HOST_RE = /^[a-z0-9-]+\.fa\.(?:[a-z0-9-]+\.)?(?:ocs\.)?oraclecloud(?:[1-9][0-9]?)?\.com$/i;
const PAGE_SIZE = 200;
const MAX_PAGES = 25; // safety cap (~5000 jobs); hard ceiling like workday
const RETRY_POLICY = { retries: 3 };
const INTER_PAGE_DELAY_MS = 250; // WAF-aware spacing between same-host pages
// facetsList is a fixed constant on the finder; %3B is the encoded ';' separator.
const FACETS_LIST = 'LOCATIONS%3BWORK_LOCATIONS%3BWORKPLACE_TYPES%3BTITLES%3BCATEGORIES%3BORGANIZATIONS%3BPOSTING_DATES%3BFLEX_FIELDS';
/** @param {string} url */
function assertOracleUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`oraclecloud: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`oraclecloud: URL must use HTTPS: ${url}`);
if (!ORACLE_HOST_RE.test(parsed.hostname)) {
throw new Error(`oraclecloud: untrusted hostname "${parsed.hostname}" — must match *.fa[.<region>][.ocs].oraclecloud[1-99].com`);
}
return url;
}
// NaN-safe Date.parse — `|| undefined` would also coerce a valid epoch 0.
// (copied from greenhouse.mjs)
function toEpochMs(value) {
if (!value) return undefined;
const parsed = Date.parse(value);
return Number.isNaN(parsed) ? undefined : parsed;
}
function sleep(ms, ctx) {
if (typeof ctx?.sleep === 'function') return ctx.sleep(ms);View on GitHub (pinned to e7abd431fc)