jackwener/OpenCLI · error · CommandExecutionError

${label} request failed: ${err?.message ?? err}

Error message

${label} request failed: ${err?.message ?? err}

What it means

steamFetch wraps all HTTP calls to Steam. If fetch itself rejects (network/DNS/TLS failure), it converts the raw error into a CommandExecutionError labeled with the operation name and the underlying message. This gives a consistent, user-facing message for Steam connectivity problems.

Source

Thrown at clis/steam/utils.js:60

    if (!s) {
        throw new ArgumentError('steam app id is required (e.g. "620" for Portal 2)');
    }
    if (!/^\d+$/.test(s)) {
        throw new ArgumentError(
            `steam app id "${value}" must be a positive integer`,
            'Copy the numeric id from `steam search` or the URL `store.steampowered.com/app/<id>/`.',
        );
    }
    return s;
}

export async function steamFetch(url, label) {
    let resp;
    try {
        resp = await fetch(url, { headers: { 'user-agent': UA, accept: 'application/json' } });
    }
    catch (err) {
        throw new CommandExecutionError(
            `${label} request failed: ${err?.message ?? err}`,
            'Check that store.steampowered.com is reachable from this network.',
        );
    }
    if (resp.status === 429) {
        throw new CommandExecutionError(
            `${label} returned HTTP 429 (rate limited)`,
            'Steam throttles bursty traffic; wait a few seconds and retry.',
        );
    }
    if (resp.status === 404) {
        throw new EmptyResultError(label, 'Steam returned 404 — the resource does not exist.');
    }
    if (!resp.ok) {
        throw new CommandExecutionError(`${label} returned HTTP ${resp.status}`);
    }
    let body;
    try {

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Verify network connectivity to store.steampowered.com (curl https://store.steampowered.com)
  2. Check DNS/proxy/VPN settings and corporate firewall rules
  3. Read the wrapped err message for the root cause (ENOTFOUND, ECONNREFUSED, timeout)
  4. Retry after connectivity is restored; use --browser-session mode if available

Example fix

// before
await steamFetch('https://store.steampowered.com/api/appdetails?appids=620', 'app details'); // fails on offline network
// after
// reconnect the network / fix proxy, then retry the same call
Defensive patterns

Strategy: retry

Validate before calling

async function isSteamReachable() { try { await fetch('https://store.steampowered.com', { method: 'HEAD' }); return true; } catch { return false; } }

Type guard

null

Try / catch

try { const data = await steamFetch(url, 'app details'); } catch (e) { if (/request failed/.test(e.message)) { console.error('Steam unreachable, check network/proxy:', e.message); } else throw e; }

Prevention

When it happens

Trigger: Any steamFetch call where the fetch() promise rejects: DNS resolution failure, no internet connection, proxy/VPN blocking store.steampowered.com, TLS errors, or the process being offline.

Common situations: Corporate firewalls blocking Steam domains, DNS misconfiguration, IPv6-only or flaky networks, offline CI runners, VPNs routing traffic away from Steam, typos in a custom Steam base URL.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/ee6d666238976f3d. Report an issue: GitHub.