{"record":{"id":"04c8cc183218c71c","repo":"Hmbown/CodeWhale","slug":"could-not-inspect-github-release-tag-detail-detail","errorCode":null,"errorMessage":"Could not inspect GitHub Release ${tag}${detail ? `: ${detail}` : \"\"}","messagePattern":"Could not inspect GitHub Release (.+?)(.+?)` : \"\"\\}","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/release/ensure-release-assets-absent.js","lineNumber":41,"sourceCode":"  );\n}\n\nfunction fetchRelease(repo, tag, ghBin = process.env.GH_BIN || \"gh\", exec = execFileSync) {\n  validateTarget(repo, tag);\n  const endpoint = `repos/${repo}/releases/tags/${encodeURIComponent(tag)}`;\n  let output;\n  try {\n    output = exec(ghBin, [\"api\", endpoint], {\n      encoding: \"utf8\",\n      maxBuffer: 10 * 1024 * 1024,\n      stdio: [\"ignore\", \"pipe\", \"pipe\"],\n    });\n  } catch (error) {\n    if (isNotFoundError(error)) {\n      return null;\n    }\n    const detail = String(error && error.stderr ? error.stderr : \"\").trim();\n    throw new Error(\n      `Could not inspect GitHub Release ${tag}${detail ? `: ${detail}` : \"\"}`,\n    );\n  }\n\n  try {\n    return JSON.parse(output);\n  } catch (error) {\n    throw new Error(`GitHub Release ${tag} returned invalid JSON: ${error.message}`);\n  }\n}\n\nfunction assertReleaseAssetsAbsent(release, tag) {\n  if (release === null) {\n    return;\n  }\n  if (!release || !Array.isArray(release.assets)) {\n    throw new Error(`GitHub Release ${tag} did not provide an asset inventory`);\n  }","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/scripts/release/ensure-release-assets-absent.js#L23-L59","documentation":"Thrown by fetchRelease() when the `gh api repos/OWNER/REPO/releases/tags/TAG` call fails for any reason other than a clean HTTP 404 (which is treated as 'release absent'). The gh CLI's stderr is embedded as detail — typical causes are missing/expired GITHUB_TOKEN, network failure, or the repository not existing for the caller. This is a wrapper error around gh CLI failure, not a release-content problem.","triggerScenarios":"Thrown at scripts/release/ensure-release-assets-absent.js:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the detail suffix for the underlying gh stderr message","Ensure gh is installed and GH_BIN points at it if non-standard","Check GITHUB_TOKEN/authentication and network access; verify the repo exists and is accessible","If the release is intentionally absent, a 404 is handled and returns null — this error means the failure was something else"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}