different-ai/openwork · error

Failed to fetch latest-mac.yml (${response.status} ${respons

Error message

Failed to fetch latest-mac.yml (${response.status} ${response.statusText}).

What it means

resolveElectronAlphaArtifact fetches latest-mac.yml via desktopFetch and throws this when the HTTP response is not ok, embedding the status code and status text. It converts a network-level failure into a descriptive error before parsing is attempted.

Source

Thrown at apps/app/src/app/lib/electron-alpha.ts:75

  return {
    arch,
    manifestUrl: ELECTRON_ALPHA_LATEST_MAC_YML_URL,
    releaseUrl: ELECTRON_ALPHA_RELEASE_PAGE_URL,
    url: resolveArtifactUrl(path),
    path,
    version,
    sha512,
  };
}

export async function resolveElectronAlphaArtifact(
  arch: "arm64" | "x64" = "arm64",
): Promise<ElectronAlphaArtifact> {
  const response = await desktopFetch(ELECTRON_ALPHA_LATEST_MAC_YML_URL, {
    headers: { Accept: "text/yaml, text/plain, */*" },
  });
  if (!response.ok) {
    throw new Error(
      `Failed to fetch latest-mac.yml (${response.status} ${response.statusText}).`,
    );
  }
  return parseElectronLatestMacYml(await response.text(), arch);
}

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Open the manifest URL in a browser/curl to see the actual status and response body.
  2. If 404, republish the alpha build or point to the correct channel URL.
  3. If 403/451, check proxy/firewall or auth requirements for the storage bucket.
  4. Retry on 5xx with backoff; the failure is often transient.

Example fix

// before: throw immediately on any non-ok status
if (!response.ok) throw new Error(`Failed to fetch latest-mac.yml (${response.status} ${response.statusText}).`);
// after: retry transient server errors once
if (!response.ok && response.status >= 500) {
  const retry = await desktopFetch(ELECTRON_ALPHA_LATEST_MAC_YML_URL, { headers: { Accept: "text/yaml, text/plain, */*" } });
  if (retry.ok) return parseElectronLatestMacYml(await retry.text(), arch);
}
Defensive patterns

Strategy: retry

Validate before calling

const res = await desktopFetch(ELECTRON_ALPHA_LATEST_MAC_YML_URL, { headers: { Accept: "text/yaml, text/plain, */*" } });
if (!res.ok) console.warn(`Manifest endpoint unhealthy: ${res.status} ${res.statusText}`);

Try / catch

try {
  const artifact = await resolveElectronAlphaArtifact();
} catch (err) {
  if (err instanceof Error && /Failed to fetch latest-mac.yml \(\d+/.test(err.message)) {
    const m = /\((\d+)/.exec(err.message);
    if (m && Number(m[1]) >= 500) scheduleRetryWithBackoff();
    else showUserFacingUpdateError(err);
  } else throw err;
}

Prevention

When it happens

Trigger: desktopFetch to ELECTRON_ALPHA_LATEST_MAC_YML_URL returns 404 (artifact removed/moved), 403 (blocked), 5xx (origin error), or any non-2xx status.

Common situations: Alpha build purged from storage, wrong channel URL after a repo/rename, corporate proxy or CDN returning errors, offline machine with no cached response.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/a2681b47bc9d3100. Report an issue: GitHub.