{"record":{"id":"b793dd2120c03ed2","repo":"zed-industries/zed","slug":"failed-to-launch-kernel-body","errorCode":null,"errorMessage":"Failed to launch kernel: {body}","messagePattern":"Failed to launch kernel: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/repl/src/kernels/remote_kernels.rs","lineNumber":55,"sourceCode":"        // Note: since the path we have locally may not be the same as the one on the remote server,\n        // we don't send it. We'll have to evaluate this decision along the way.\n        path: None,\n    };\n\n    let kernel_launch_request = serde_json::to_string(&kernel_launch_request)?;\n\n    let request = Request::builder()\n        .method(\"POST\")\n        .uri(&remote_server.api_url(\"/kernels\"))\n        .header(\"Authorization\", format!(\"token {}\", remote_server.token))\n        .body(AsyncBody::from(kernel_launch_request))?;\n\n    let response = http_client.send(request).await?;\n\n    if !response.status().is_success() {\n        let mut body = String::new();\n        response.into_body().read_to_string(&mut body).await?;\n        anyhow::bail!(\"Failed to launch kernel: {body}\");\n    }\n\n    let mut body = String::new();\n    response.into_body().read_to_string(&mut body).await?;\n\n    let response: jupyter_websocket_client::Kernel = serde_json::from_str(&body)?;\n\n    Ok(response.id)\n}\n\npub async fn list_remote_kernelspecs(\n    remote_server: RemoteServer,\n    http_client: Arc<dyn HttpClient>,\n) -> Result<Vec<RemoteKernelSpecification>> {\n    let url = remote_server.api_url(\"/kernelspecs\");\n\n    let request = Request::builder()\n        .method(\"GET\")","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/repl/src/kernels/remote_kernels.rs#L37-L73","documentation":"Raised in launch_remote_kernel when the HTTP POST to the remote server's /kernels endpoint returns a non-success status. The response body (the server's error message) is interpolated into the message, telling the user why the remote kernel process could not be launched.","triggerScenarios":"Thrown at crates/repl/src/kernels/remote_kernels.rs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the remote Jupyter server is running and the API URL/token are correct","Check that the requested kernel name exists on the remote server (`jupyter kernelspec list`)","Inspect the returned body included in the error for the server-side cause","Retry if the server was temporarily unavailable"],"exampleFix":null,"handlingStrategy":"retry","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-14T05:17:10.506Z"}