jackwener/OpenCLI · error · CommandExecutionError

${label} returned HTTP ${resp.status}

Error message

${label} returned HTTP ${resp.status}

What it means

steamFetch throws a CommandExecutionError for any non-ok HTTP status that is not specifically 429 or 404, reporting the status code with the operation label. This is the generic unexpected-response guard for Steam endpoints.

Source

Thrown at clis/steam/utils.js:75

        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 {
        body = await resp.json();
    }
    catch (err) {
        throw new CommandExecutionError(`${label} returned malformed JSON: ${err?.message ?? err}`);
    }
    return body;
}

export function asString(value) {
    return value == null ? '' : String(value);
}

const HTML_ENTITIES = {
    '&amp;': '&', '&lt;': '<', '&gt;': '>', '&quot;': '"', '&apos;': "'", '&#39;': "'", '&nbsp;': ' ',
};

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Retry after a short delay; 5xx errors are usually transient
  2. Check https://steamstat.us for Steam outages or maintenance
  3. Inspect the status code to determine if the block is client-side (403) or server-side (5xx)
  4. Route requests through a different network/IP if a CDN block is suspected

Example fix

// before
const resp = await steamFetch(url, 'app details'); // throws on 503 during maintenance
// after
// wrap in retry with backoff for transient 5xx
let resp;
for (let i = 0; i < 3; i++) {
  try { resp = await steamFetch(url, 'app details'); break; }
  catch (e) { if (!/HTTP 5/.test(e.message) || i === 2) throw e; await sleep(2000 * (i + 1)); }
}
Defensive patterns

Strategy: retry

Validate before calling

// check Steam service status before bulk jobs
const status = await fetch('https://steamstat.us/').then(r => r.text()).catch(() => '');

Type guard

null

Try / catch

try { return await steamFetch(url, label); } catch (e) { const m = /HTTP (\d+)/.exec(e.message); if (m && m[1] >= 500) { await sleep(3000); return steamFetch(url, label); } throw e; }

Prevention

When it happens

Trigger: Steam returning 500/502/503 during outages or maintenance, 403 from edge/CDN blocks, or any other 4xx/5xx outside the specially handled codes.

Common situations: Steam store maintenance windows, temporary server-side errors, CDN or bot-protection blocking datacenter IPs, misconstructed request URLs causing 403/410.

Related errors


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