jackwener/OpenCLI · error · CommandExecutionError
${label} request failed: ${err?.message ?? err}
Error message
${label} request failed: ${err?.message ?? err} What it means
CommandExecutionError thrown by dblpFetch when the underlying HTTP request to dblp.org itself fails (fetch rejects) — DNS failure, connection refused/reset, TLS error, timeout. The error message wraps the original err.message with the request label for context.
Source
Thrown at clis/dblp/utils.js:41
*/
const KEY_PATTERN = /^[a-z]+(?:\/[A-Za-z0-9_.-]+)+$/;
/**
* Wraps `fetch` with typed errors. We always set a UA per dblp's
* polite-fetch guidance (https://dblp.org/faq/How+to+use+the+dblp+search+API.html).
*/
async function dblpFetch(url, label, accept) {
let res;
try {
res = await fetch(url, {
headers: {
accept,
'user-agent': 'opencli-dblp/1.0 (+https://github.com/jackwener/opencli)',
},
});
}
catch (err) {
throw new CommandExecutionError(`${label} request failed: ${err?.message ?? err}`, 'Check that dblp.org is reachable from this network.');
}
if (!res.ok) {
if (res.status === 429) {
throw new CommandExecutionError(`${label} returned HTTP 429 (rate limited)`, 'dblp throttles clients that fetch too aggressively. Wait a few seconds and retry, or lower --limit.');
}
if (res.status === 404) {
throw new EmptyResultError(label, 'dblp returned 404 — the requested record may not exist.');
}
throw new CommandExecutionError(`${label} returned HTTP ${res.status}`, 'Inspect the response in a browser at the same URL for more context.');
}
return res;
}
export async function dblpFetchJson(path, label) {
const res = await dblpFetch(`${DBLP_ORIGIN}${path}`, label, 'application/json');
let body;
try {
body = await res.json();View on GitHub (pinned to 49907e53dc)
Solutions
- Check general internet connectivity (e.g. curl https://dblp.org in a terminal)
- Check the wrapped err.message in the error for the root cause (ENOTFOUND, ECONNREFUSED, timeout)
- Configure proxy env vars (HTTPS_PROXY) if behind a corporate proxy
- Retry later if dblp.org is down (check status/downdetector)
- If Node's fetch has TLS issues, verify CA/certificate setup
Example fix
// before opencli dblp search 'transformers' # offline // Error: dblp search request failed: fetch failed // after # connect to network / set proxy, then export HTTPS_PROXY=http://proxy.corp:8080 opencli dblp search 'transformers'
Defensive patterns
Strategy: retry
Validate before calling
// Optionally pre-check reachability before the real call.
const probe = await fetch('https://dblp.org', { method: 'HEAD' }).catch(() => null);
if (!probe) throw new Error('dblp.org unreachable — check network/proxy'); Try / catch
try {
rows = await dblpSearch({ query });
} catch (err) {
if (/request failed/.test(err.message)) {
await sleep(1000);
rows = await dblpSearch({ query }); // retry once after transient network issue
} else throw err;
} Prevention
- Set HTTPS_PROXY in restricted/corporate networks
- Add retry-with-backoff around all dblp calls
- Monitor connectivity/DNS in CI environments before runs
- Check dblp.org status when errors cluster in time
When it happens
Trigger: Any dblp subcommand (author, paper, search) while the network request throws: no internet, DNS failure, firewall/proxy blocking dblp.org, TLS interception, or dblp.org outage.
Common situations: Working offline; corporate proxy blocking dblp.org; VPN or DNS misconfiguration; dblp.org downtime; IPv6 connectivity issues in the runtime.
Related errors
- 1point3acres request failed: ${error?.message || error}
- archive snapshots request failed: ${error?.message || error}
- coingecko derivatives request failed: ${err?.message ?? err}
- ${label} returned HTTP ${res.status}
- ${label} returned malformed JSON: ${err?.message ?? err}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/70db001af6e98aa7.
Report an issue: GitHub.