{"record":{"id":"6740832a86325ee5","repo":"zed-industries/zed","slug":"failed-to-shutdown-kernel","errorCode":null,"errorMessage":"Failed to shutdown kernel: {}","messagePattern":"Failed to shutdown kernel: (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/repl/src/kernels/remote_kernels.rs","lineNumber":294,"sourceCode":"    }\n\n    fn force_shutdown(&mut self, window: &mut Window, cx: &mut App) -> Task<anyhow::Result<()>> {\n        let url = self\n            .remote_server\n            .api_url(&format!(\"/kernels/{}\", self.kernel_id));\n        let token = self.remote_server.token.clone();\n        let http_client = self.http_client.clone();\n\n        window.spawn(cx, async move |_| {\n            let request = Request::builder()\n                .method(\"DELETE\")\n                .uri(&url)\n                .header(\"Authorization\", format!(\"token {}\", token))\n                .body(AsyncBody::default())?;\n\n            let response = http_client.send(request).await?;\n\n            anyhow::ensure!(\n                response.status().is_success(),\n                \"Failed to shutdown kernel: {}\",\n                response.status()\n            );\n            Ok(())\n        })\n    }\n\n    fn kill(&mut self) {\n        self.request_tx.close_channel();\n        self.stdin_tx.close_channel();\n    }\n}\n","sourceCodeStart":276,"sourceCodeEnd":308,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/repl/src/kernels/remote_kernels.rs#L276-L308","documentation":"Raised in RemoteRunningKernel::force_shutdown(): the DELETE /kernels/{kernel_id} request to the remote Jupyter server returned a non-success status, so the remote kernel could not be terminated. The status is embedded in the error returned by the shutdown task.","triggerScenarios":"Thrown at crates/repl/src/kernels/remote_kernels.rs:294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the kernel id still exists on the remote server","Verify remote server connectivity and token"],"exampleFix":null,"handlingStrategy":"try-catch","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"}