nextlevelbuilder/ui-ux-pro-max-skill · error · GitHubDownloadError

Failed to fetch releases: ${response.status} ${response.stat

Error message

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

What it means

fetchReleases() lists a repo's releases via GET /repos/{owner}/{repo}/releases; after checkRateLimit() passes, any other non-2xx response is wrapped in GitHubDownloadError with the HTTP status and reason. This covers everything that is not a rate limit: 401 bad token, 404 wrong repo/owner constants, 5xx GitHub outages, redirects, etc.

Source

Thrown at cli/src/utils/github.ts:68

  const resolved = (token || process.env['UI_PRO_MAX_GITHUB_TOKEN'] || process.env['GITHUB_TOKEN'])?.trim();
  return resolved ? { 'Authorization': `Bearer ${resolved}` } : {};
}

export async function fetchReleases(token?: string): Promise<Release[]> {
  const url = `${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/releases`;

  const response = await fetch(url, {
    headers: {
      'Accept': 'application/vnd.github.v3+json',
      'User-Agent': USER_AGENT,
      ...getAuthHeaders(token),
    },
  });

  checkRateLimit(response);

  if (!response.ok) {
    throw new GitHubDownloadError(`Failed to fetch releases: ${response.status} ${response.statusText}`);
  }

  return response.json();
}

export async function getLatestRelease(token?: string): Promise<Release> {
  const url = `${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest`;

  const response = await fetch(url, {
    headers: {
      'Accept': 'application/vnd.github.v3+json',
      'User-Agent': USER_AGENT,
      ...getAuthHeaders(token),
    },
  });

  checkRateLimit(response);

View on GitHub (pinned to a38d04c3d5)

Solutions

  1. Reproduce the raw call to see the exact status: `curl -i https://api.github.com/repos/<owner>/<repo>/releases`.
  2. If 401, remove or refresh the token in UI_PRO_MAX_GITHUB_TOKEN/GITHUB_TOKEN (an invalid token is worse than none).
  3. If 404, verify the owner/repo name encoded in github.ts still matches the live repository; update the CLI to a version pointing at the new name.
  4. If 5xx, retry later and check githubstatus.com.
Defensive patterns

Strategy: try-catch

Try / catch

import { GitHubDownloadError, fetchReleases } from './utils/github';

try {
  const releases = await fetchReleases(token);
} catch (e) {
  if (e instanceof GitHubDownloadError) {
    const status = e.message.match(/(\d{3})/)?.[1];
    if (status === '401') console.error('Token rejected - unset UI_PRO_MAX_GITHUB_TOKEN/GITHUB_TOKEN or refresh it.');
    if (status === '404') console.error('Repo not found - owner/repo moved? Update the CLI.');
    if (status?.startsWith('5')) console.error('GitHub incident - retry later / check githubstatus.com.');
  }
  throw e;
}

Prevention

When it happens

Trigger: A stale or revoked token producing 401 Bad credentials; REPO_OWNER/REPO_NAME constants pointing at a renamed or transferred repository (404); GitHub API returning 5xx; a corporate proxy rewriting responses.

Common situations: The project's repo was renamed/moved after the CLI version was published; an expired PAT left in the environment; GitHub incidents; typos when someone forks and retargets the constants.

Related errors


AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14). Data as JSON: /api/errors/f512b0fcbf6e8761. Report an issue: GitHub.