coleam00/Archon · error

Cannot reach GitHub API: ${err.message}

Error message

Cannot reach GitHub API: ${err.message}

What it means

Error "Cannot reach GitHub API: ${err.message}" thrown in coleam00/Archon.

Source

Thrown at packages/cli/src/commands/workflow.ts:5103

  type: 'file' | 'dir';
  download_url: string | null;
  path: string;
}

/** Fetch directory listing from GitHub Contents API at a pinned SHA. */
async function fetchGitHubDirectory(
  owner: string,
  repo: string,
  path: string,
  sha: string
): Promise<GitHubContentItem[]> {
  const url = `https://api.github.com/repos/${owner}/${repo}/contents/${path}?ref=${sha}`;
  let res: Response;
  try {
    res = await fetch(url, { headers: { Accept: 'application/vnd.github.v3+json' } });
  } catch (error) {
    const err = error as Error;
    throw new Error(`Cannot reach GitHub API: ${err.message}`);
  }
  if (!res.ok) {
    throw new Error(`GitHub API error: HTTP ${String(res.status)} from ${url}`);
  }
  const data: unknown = await res.json();
  if (!Array.isArray(data)) {
    throw new Error(`Expected directory listing from ${url}, got a single file`);
  }
  return data as GitHubContentItem[];
}

/** Download a file from raw.githubusercontent.com at a pinned SHA. */
async function downloadRawFile(
  owner: string,
  repo: string,
  filePath: string,
  sha: string
): Promise<string> {

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/cli/src/commands/workflow.ts:5103 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/a3f9ea848486ae47. Report an issue: GitHub.