windmill-labs/windmill · error

Failed to fetch version: ${response.status} ${response.statu

Error message

Failed to fetch version: ${response.status} ${response.statusText}

What it means

fetchVersion called GET <base>/api/version and received a non-OK HTTP status, so the CLI cannot determine the server version (used for compatibility checks). The input at fault is the base URL / server state, not local config content.

Source

Thrown at cli/src/core/context.ts:721

  const extraHeaders = getHeaders();
  if (extraHeaders) {
    for (const [key, value] of Object.entries(extraHeaders)) {
      requestHeaders.set(key, value);
    }
  }

  const versionUrl = new URL(new URL(baseUrl).origin + "/api/version");
  const response = await fetch(versionUrl, {
    headers: requestHeaders,
    method: "GET",
  });

  await detectAuthGatewayChallenge(response, versionUrl.toString());

  if (!response.ok) {
    // Consume response body even on error to avoid resource leak
    await response.text();
    throw new Error(
      `Failed to fetch version: ${response.status} ${response.statusText}`
    );
  }

  return await response.text();
}
export async function tryResolveVersion(
  opts: GlobalOptions
): Promise<number | undefined> {
  if ((opts as any).__cache_version) {
    return (opts as any).__cache_version;
  }

  const workspaceRes = await tryResolveWorkspace(opts);
  if (workspaceRes.isError) return undefined;
  const workspace = (workspaceRes as { isError: false; value: Workspace }).value;
  const version = await fetchVersion(workspace.remote);

View on GitHub (pinned to e474e8803c)

Solutions

  1. Check the status code: 404 usually means --base-url points at the wrong path or a non-Windmill server.
  2. Retry if 5xx — the server may be temporarily unhealthy.
  3. Verify the instance is up and that any auth gateway in front of it forwards /api/version.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at cli/src/core/context.ts:721 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/c34a2faaacfcb2c9. Report an issue: GitHub.