{"record":{"id":"c3c09448f3d4a1d3","repo":"zed-industries/zed","slug":"invalid-url-scheme-scheme","errorCode":null,"errorMessage":"invalid URL scheme: {scheme}","messagePattern":"invalid URL scheme: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cloud_api_client/src/websocket/native.rs","lineNumber":71,"sourceCode":"                    }\n                }\n            }\n        });\n\n        (message_rx.into_stream().boxed(), task)\n    }\n}\n\nimpl CloudApiClient {\n    pub fn connect(self: &std::sync::Arc<Self>, cx: &App) -> Result<Task<Result<Connection>>> {\n        let mut connect_url = self\n            .http_client\n            .build_zed_cloud_url(\"/client/users/connect\")?;\n        connect_url\n            .set_scheme(match connect_url.scheme() {\n                \"https\" => \"wss\",\n                \"http\" => \"ws\",\n                scheme => Err(anyhow!(\"invalid URL scheme: {scheme}\"))?,\n            })\n            .map_err(|_| anyhow!(\"failed to set URL scheme\"))?;\n\n        let credentials = self.credentials.read();\n        let credentials = credentials.as_ref().context(\"no credentials provided\")?;\n        let authorization_header = format!(\"{} {}\", credentials.user_id, credentials.access_token);\n\n        Ok(gpui_tokio::Tokio::spawn_result(cx, async move {\n            let websocket = WebSocket::connect(connect_url)\n                .with_request(\n                    request::Builder::new()\n                        .header(\"Authorization\", authorization_header)\n                        .header(PROTOCOL_VERSION_HEADER_NAME, PROTOCOL_VERSION.to_string()),\n                )\n                .await?;\n\n            Ok(Connection::new(websocket))\n        }))","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/cloud_api_client/src/websocket/native.rs#L53-L89","documentation":"CloudApiClient::connect rewrites the /client/users/connect URL from https/http to wss/ws before opening the websocket; when the base URL carries any other scheme, the match arm rejects it with this error embedding the offending scheme, meaning the configured cloud base URL is not a web URL (misconfigured override or malformed build URL).","triggerScenarios":"Thrown at crates/cloud_api_client/src/websocket/native.rs:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the Zed cloud base URL uses https:// (or http:// for local dev)","Remove or fix any custom cloud URL override that introduced a non-web scheme","Validate the scheme at configuration load time and fall back to the default URL"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}