{"record":{"id":"42578707642b2228","repo":"gitbutlerapp/gitbutler","slug":"github-graphql-response-did-not-include-data","errorCode":null,"errorMessage":"GitHub GraphQL response did not include data","messagePattern":"GitHub GraphQL response did not include data","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-github/src/client.rs","lineNumber":1304,"sourceCode":"    #[derive(Deserialize)]\n    struct GraphQlResponse {\n        data: Option<serde_json::Value>,\n        errors: Option<Vec<GraphQlError>>,\n    }\n\n    let payload: GraphQlResponse = serde_json::from_slice(body)?;\n\n    if let Some(errors) = payload.errors {\n        let messages = errors\n            .into_iter()\n            .map(|error| error.message)\n            .collect::<Vec<_>>()\n            .join(\"; \");\n        bail!(\"GitHub GraphQL returned errors: {messages}\");\n    }\n\n    let Some(data) = payload.data else {\n        bail!(\"GitHub GraphQL response did not include data\");\n    };\n\n    Ok(serde_json::from_value(data)?)\n}\n\npub struct PullRequestNodeId {\n    id: String,\n}\n\nimpl PullRequestNodeId {\n    pub fn from_string(value: String) -> Self {\n        PullRequestNodeId { id: value }\n    }\n}\n\nimpl Serialize for PullRequestNodeId {\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where","sourceCodeStart":1286,"sourceCodeEnd":1322,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-github/src/client.rs#L1286-L1322","documentation":"A 200 GraphQL response contained neither `errors` nor `data`. GitHub never sends this shape, so the decoder refuses to guess; the body most likely never came from GitHub's GraphQL endpoint unmodified.","triggerScenarios":"A proxy or gateway rewrote or emptied the response body; base_url misconfiguration landing on an endpoint that returns 200 with an HTML page; GitHub Enterprise anomalies.","commonSituations":"Corporate proxies with content inspection; custom forge base URLs; API gateways in front of GitHub.","solutions":["Check the configured base URL - it must reach the real GitHub API host","Bypass or whitelist the proxy for the GitHub API host","Capture the raw response body once to identify what is actually answering"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match client.graphql_query(query, &vars).await {\n    Err(e) if e.to_string().contains(\"did not include data\") => {\n        // capture the raw body once via a debug proxy to find the interceptor\n        log::warn!(\"non-GitHub-shaped GraphQL response: {e}\");\n        return Err(e);\n    }\n    other => other?,\n}","preventionTips":["Point base URLs directly at GitHub API hosts","Whitelist the API host in corporate proxies instead of inspecting traffic","Log raw responses once when diagnosing shape anomalies"],"tags":["github","graphql","response-shape","proxy"],"backgroundTag":"graphql-empty-response-data","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}