{"record":{"id":"f3a1b89f8dfebfb4","repo":"Hmbown/CodeWhale","slug":"failed-to-run-gh-pr-view-e","errorCode":null,"errorMessage":"Failed to run `gh pr view`: {e}","messagePattern":"Failed to run `gh pr view`: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":8247,"sourceCode":"    title: String,\n    body: String,\n    base: String,\n    head: String,\n    url: String,\n}\n\nfn run_gh_pr_view(number: u32, repo: Option<&str>) -> Result<GhPullRequest> {\n    let mut cmd = crate::dependencies::Gh::command()\n        .ok_or_else(|| anyhow::anyhow!(\"gh not found on PATH\"))?;\n    cmd.arg(\"pr\").arg(\"view\").arg(number.to_string());\n    if let Some(r) = repo {\n        cmd.arg(\"--repo\").arg(r);\n    }\n    cmd.arg(\"--json\")\n        .arg(\"title,body,baseRefName,headRefName,url\");\n    let output = cmd\n        .output()\n        .map_err(|e| anyhow::anyhow!(\"Failed to run `gh pr view`: {e}\"))?;\n    if !output.status.success() {\n        let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string();\n        bail!(\"gh pr view #{number} failed: {stderr}\");\n    }\n    let raw = String::from_utf8_lossy(&output.stdout).to_string();\n    let value: serde_json::Value = serde_json::from_str(&raw)\n        .map_err(|e| anyhow::anyhow!(\"gh pr view returned non-JSON output: {e}\"))?;\n    let pick = |key: &str| {\n        value\n            .get(key)\n            .and_then(serde_json::Value::as_str)\n            .unwrap_or_default()\n            .to_string()\n    };\n    Ok(GhPullRequest {\n        title: pick(\"title\"),\n        body: pick(\"body\"),\n        base: pick(\"baseRefName\"),","sourceCodeStart":8229,"sourceCodeEnd":8265,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/lib.rs#L8229-L8265","documentation":"Spawning the `gh pr view` subprocess itself failed (OS-level error such as permission denied or resource exhaustion) — the command never produced output. Distinct from gh exiting non-zero.","triggerScenarios":"Thrown at crates/tui/src/lib.rs:8247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm `gh` is installed and executable on PATH","Check for OS-level issues (permissions, process/resource limits)","Re-run the command after fixing the environment"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}