{"record":{"id":"bc32abe2219efc68","repo":"zed-industries/zed","slug":"graphql-endpoint-discovery-failed","errorCode":null,"errorMessage":"GraphQL endpoint discovery failed: {}","messagePattern":"GraphQL endpoint discovery failed: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/copilot_chat/src/copilot_chat.rs","lineNumber":965,"sourceCode":"                && model\n                    .policy\n                    .as_ref()\n                    .is_none_or(|policy| policy.state == \"enabled\")\n        })\n        .collect();\n\n    if let Some(default_model_position) = models.iter().position(|model| model.is_chat_default) {\n        let default_model = models.remove(default_model_position);\n        models.insert(0, default_model);\n    }\n\n    Ok(models)\n}\n\n#[derive(Deserialize)]\nstruct GraphQLResponse {\n    data: Option<GraphQLData>,\n}\n\n#[derive(Deserialize)]\nstruct GraphQLData {\n    viewer: GraphQLViewer,\n}\n\n#[derive(Deserialize)]\nstruct GraphQLViewer {\n    #[serde(rename = \"copilotEndpoints\")]\n    copilot_endpoints: GraphQLCopilotEndpoints,\n}\n\n#[derive(Deserialize)]\nstruct GraphQLCopilotEndpoints {\n    api: String,\n}\n\npub(crate) async fn discover_api_endpoint(","sourceCodeStart":947,"sourceCodeEnd":983,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/copilot_chat/src/copilot_chat.rs#L947-L983","documentation":"The GraphQL query used to discover the Copilot Chat API endpoint failed; the message wraps the discovery error (network failure or GraphQL error response). Zed could not learn which API base URL to use for Copilot Chat requests.","triggerScenarios":"Thrown at crates/copilot_chat/src/copilot_chat.rs:957 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network access to the Copilot GraphQL endpoint","Re-authenticate if the token was rejected (see the wrapped error)","Retry; transient failures of discovery are common"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}