{"record":{"id":"05864264713f8e41","repo":"coleam00/Archon","slug":"github-api-error-http-string-res-status-from","errorCode":null,"errorMessage":"GitHub API error: HTTP ${String(res.status)} from ${url}","messagePattern":"GitHub API error: HTTP (.+?) from (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":5106,"sourceCode":"}\n\n/** Fetch directory listing from GitHub Contents API at a pinned SHA. */\nasync function fetchGitHubDirectory(\n  owner: string,\n  repo: string,\n  path: string,\n  sha: string\n): Promise<GitHubContentItem[]> {\n  const url = `https://api.github.com/repos/${owner}/${repo}/contents/${path}?ref=${sha}`;\n  let res: Response;\n  try {\n    res = await fetch(url, { headers: { Accept: 'application/vnd.github.v3+json' } });\n  } catch (error) {\n    const err = error as Error;\n    throw new Error(`Cannot reach GitHub API: ${err.message}`);\n  }\n  if (!res.ok) {\n    throw new Error(`GitHub API error: HTTP ${String(res.status)} from ${url}`);\n  }\n  const data: unknown = await res.json();\n  if (!Array.isArray(data)) {\n    throw new Error(`Expected directory listing from ${url}, got a single file`);\n  }\n  return data as GitHubContentItem[];\n}\n\n/** Download a file from raw.githubusercontent.com at a pinned SHA. */\nasync function downloadRawFile(\n  owner: string,\n  repo: string,\n  filePath: string,\n  sha: string\n): Promise<string> {\n  const rawUrl = `https://raw.githubusercontent.com/${owner}/${repo}/${sha}/${filePath}`;\n  let res: Response;\n  try {","sourceCodeStart":5088,"sourceCodeEnd":5124,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L5088-L5124","documentation":"Error \"GitHub API error: HTTP ${String(res.status)} from ${url}\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:5106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}