{"record":{"id":"613841bbd79a7a2c","repo":"zed-industries/zed","slug":"blockedhttpclient-disallowed-request","errorCode":null,"errorMessage":"BlockedHttpClient disallowed request","messagePattern":"BlockedHttpClient disallowed request","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/http_client/src/http_client.rs","lineNumber":393,"sourceCode":"\n    ENV_VARS.iter().find_map(|var| std::env::var(var).ok())\n}\n\npub struct BlockedHttpClient;\n\nimpl BlockedHttpClient {\n    pub fn new() -> Self {\n        BlockedHttpClient\n    }\n}\n\nimpl HttpClient for BlockedHttpClient {\n    fn send(\n        &self,\n        _req: Request<AsyncBody>,\n    ) -> BoxFuture<'static, anyhow::Result<Response<AsyncBody>>> {\n        Box::pin(async {\n            Err(std::io::Error::new(\n                std::io::ErrorKind::PermissionDenied,\n                \"BlockedHttpClient disallowed request\",\n            )\n            .into())\n        })\n    }\n\n    fn user_agent(&self) -> Option<&HeaderValue> {\n        None\n    }\n\n    fn proxy(&self) -> Option<&Url> {\n        None\n    }\n\n    #[cfg(feature = \"test-support\")]\n    fn as_fake(&self) -> &FakeHttpClient {\n        panic!(\"called as_fake on {}\", type_name::<Self>())","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/http_client/src/http_client.rs#L375-L411","documentation":"A request was attempted through BlockedHttpClient, an HttpClient implementation that deliberately denies all network access. It is installed in contexts (e.g. sandboxed or offline agents) where outbound HTTP is forbidden by policy.","triggerScenarios":"Thrown at crates/http_client/src/http_client.rs:393 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a real HTTP client in contexts where network access is permitted","Respect the block: perform the task without network requests, or surface 'network disabled' to the user"],"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-14T00:17:10.932Z"}