zed-industries/zed · error
Cloud WebSocket error
Error message
Cloud WebSocket error: {error} What it means
Raised inside the Connection::spawn receive loop when the underlying Cloud WebSocket yields an error frame instead of a message. It means the stream itself failed (connection reset, protocol violation, or TLS error) and the message channel will terminate, signaling clients that the Cloud WebSocket session has ended abnormally.
Solutions
- Check network connectivity and any proxy/firewall that may interrupt long-lived WebSocket connections
- Inspect the wrapped error for a close code or TLS/IO cause to distinguish server-side shutdown from local network failure
- Re-establish the connection via CloudApiClient::connect once the underlying cause is resolved
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/cloud_api_client/src/websocket/web.rs:34 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/ed8da17b382564cf.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cloud_api_client/src/websocket/web.rs:34
pub struct Connection {
rx: SplitStream<WebSocket>,
}
impl Connection {
fn new(websocket: WebSocket) -> Self {
let (_, rx) = websocket.split();
Self { rx }
}
pub fn spawn(self, cx: &App) -> (MessageStream, Task<()>) {
let mut rx = self.rx;
let (message_tx, message_rx) = unbounded();
let task = cx.spawn(async move |_cx| {
while let Some(frame) = rx.next().await {
let frame = match frame {
Ok(frame) => frame,
Err(error) => {
let error = anyhow!("Cloud WebSocket error: {error}");
if message_tx.unbounded_send(Err(error)).is_err() {
break;
}
continue;
}
};
if !forward_frame(frame, &message_tx) {
break;
}
}
});
(message_rx.into_stream().boxed(), task)
}
}
impl CloudApiClient {
pub fn connect(self: &std::sync::Arc<Self>, cx: &App) -> Result<Task<Result<Connection>>> {View on GitHub (pinned to f4178619ac)