can1357/oh-my-pi · error · Error

Failed to fetch release info for ${pkg}: ${response.statusTe

Error message

Failed to fetch release info for ${pkg}: ${response.statusText}

What it means

Thrown when the npm registry responds with a non-OK HTTP status that is not the special-cased canary-404. The updater surfaces the status text so the user knows the release-metadata lookup itself failed, before any download happens.

Source

Thrown at packages/coding-agent/src/cli/update-cli.ts:784

	let response: Response;
	try {
		response = await fetch(`${NPM_REGISTRY}${pkg}/${channel === "canary" ? "canary" : "latest"}`, {
			signal: withTimeoutSignal(timeoutMs),
		});
	} catch (err) {
		if (isTimeoutError(err)) {
			throw new Error(`Timed out fetching release info for ${pkg} after ${Math.round(timeoutMs / 1000)}s`, {
				cause: err,
			});
		}
		if (isUnsupportedProxyError(err)) throw new Error(unsupportedProxyMessage(), { cause: err });
		throw err;
	}
	if (!response.ok) {
		if (response.status === 404 && channel === "canary") {
			throw new Error(`No canary release has been published for ${pkg} yet. Try \`${APP_NAME} update --stable\`.`);
		}
		throw new Error(`Failed to fetch release info for ${pkg}: ${response.statusText}`);
	}

	const data: unknown = await response.json();
	if (!isRecord(data) || typeof data.version !== "string") {
		throw new Error(`Malformed npm registry response for ${pkg}: missing version`);
	}
	return { version: data.version, manifest: data };
}

/**
 * Get the latest release info from the npm registry, following `omp.rename`
 * pointers ({@link resolveReleaseRename}) when the package has moved to a new
 * npm name. Version, dist, and install names all come from the final manifest
 * in the chain. Uses npm instead of GitHub API to avoid unauthenticated rate
 * limiting.
 */
export async function getLatestRelease(
	options: { timeoutMs?: number; channel?: UpdateChannel } = {},

View on GitHub (pinned to 9690622007)

Solutions

  1. Check the npm registry status page and retry after a few minutes on 5xx
  2. If 429, wait or switch networks (rate limits are often per-IP)
  3. Verify the package name exists: curl https://registry.npmjs.org/<pkg>/latest
  4. Check proxy/firewall interference (403 responses) and bypass or fix the proxy
  5. As a workaround, update via npm/bun directly: npm install -g <pkg>@latest

Example fix

// before: corporate proxy blocks registry.npmjs.org
omp update  // Failed to fetch release info: Forbidden
// after: allowlist registry.npmjs.org or bypass the proxy
export NO_PROXY=registry.npmjs.org
omp update
Defensive patterns

Strategy: retry

Validate before calling

const res = await fetch("https://registry.npmjs.org/<pkg>/latest");
if (!res.ok) throw new Error(`registry unhealthy: ${res.status} ${res.statusText}`);

Try / catch

try {
  await runUpdate();
} catch (err) {
  if (String(err?.message).startsWith("Failed to fetch release info")) {
    // retry with backoff; registry may be degraded or rate-limiting
    await Bun.sleep(5000);
    return runUpdate();
  }
  throw err;
}

Prevention

When it happens

Trigger: fetch of `${NPM_REGISTRY}${pkg}/latest` (or `/canary`) returns response.ok === false with any status other than 404+canary — e.g. 5xx from the registry, 429 rate limit, 403 from a blocking proxy, or 404 on the stable tag for a renamed/missing package.

Common situations: npm registry outage or partial degradation, rate limiting behind shared IPs/CI, registry mirror or proxy returning errors, package uninstalled/renamed so the latest tag no longer resolves.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/f5a1d3f5aab212ab. Report an issue: GitHub.