Hmbown/CodeWhale · error · NonRetryableError

too many redirects starting at ${url}

Error message

too many redirects starting at ${url}

What it means

Error "too many redirects starting at ${url}" thrown in Hmbown/CodeWhale.

Source

Thrown at npm/codewhale/scripts/install.js:866

// Public download primitives (now retry + progress aware)
// ────────────────────────────────────────────────────────────────────────────

async function followRedirects(url, opts = {}) {
  const maxRedirects = 10;
  let current = url;
  for (let hop = 0; hop < maxRedirects; hop++) {
    const result = await httpRequest(current, opts);
    if (result.redirect) {
      try {
        current = new URL(result.redirect, current).toString();
      } catch {
        current = result.redirect;
      }
      continue;
    }
    return result;
  }
  throw new NonRetryableError(`too many redirects starting at ${url}`);
}

function streamToFile(response, destination, progress) {
  return new Promise((resolve, reject) => {
    const sink = createWriteStream(destination);
    let done = false;
    const finish = (err) => {
      if (done) return;
      done = true;
      if (err) {
        sink.destroy();
        reject(err);
      } else {
        resolve();
      }
    };
    response.on("data", (chunk) => {
      if (progress) progress.onChunk(chunk.length);

View on GitHub (pinned to 8880682c63)

When it happens

Trigger: Thrown at npm/codewhale/scripts/install.js:866 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/e2dfcb98ece5d677. Report an issue: GitHub.