zed-industries/zed · error
not in a call
Error message
not in a call
What it means
Returned by join_project when the call object has no current room (self.0.read(cx).room() is None). Since project joining only happens inside an active call, absence of a room makes the request meaningless and it fails with this sentinel.
Solutions
- Join or start a call room before attempting to join a shared project
- Retry after the room connection finishes establishing
- Handle None from the room lookup by prompting the user to rejoin the call
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at crates/call/src/call_impl/mod.rs:205 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/66064b7d9f93a482.
Report an issue: GitHub.
Appendix: source
Thrown at crates/call/src/call_impl/mod.rs:205
fn most_active_project(&self, cx: &App) -> Option<(u64, u64)> {
let room = self.0.read(cx).room()?;
room.read(cx).most_active_project(cx)
}
fn share_project(&self, project: Entity<Project>, cx: &mut App) -> Task<Result<u64>> {
self.0
.update(cx, |this, cx| this.share_project(project, cx))
}
fn join_project(
&self,
project_id: u64,
language_registry: Arc<language::LanguageRegistry>,
fs: Arc<dyn fs::Fs>,
cx: &mut App,
) -> Task<Result<Entity<Project>>> {
let Some(room) = self.0.read(cx).room().cloned() else {
return Task::ready(Err(anyhow::anyhow!("not in a call")));
};
room.update(cx, |room, cx| {
room.join_project(project_id, language_registry, fs, cx)
})
}
fn peer_id_for_user_in_room(&self, user_id: u64, cx: &App) -> Option<proto::PeerId> {
let room = self.0.read(cx).room()?.read(cx);
room.remote_participants()
.values()
.find(|p| p.user.legacy_id == user_id)
.map(|p| p.peer_id)
}
fn subscribe(
&self,
window: &mut Window,
cx: &mut Context<Workspace>,View on GitHub (pinned to f4178619ac)