zed-industries/zed · error · anyhow::Error
not a room participant
Error message
not a room participant
What it means
room_connection_ids streams all participants of the room and tracks whether the requesting connection appears among their answering connections; if the loop finishes without a match, the sentinel 'not a room participant' is returned and the connection list is withheld.
Solutions
- Join the room before requesting its connections
- Verify the connection is still active (not reconnected with a new ID)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/collab/src/db/queries/rooms.rs:1304 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/3cb523d56a1a269a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/collab/src/db/queries/rooms.rs:1304
.filter(room_participant::Column::RoomId.eq(room_id))
.stream(&*tx)
.await?;
let mut is_participant = false;
let mut connection_ids = HashSet::default();
while let Some(participant) = participants.next().await {
let participant = participant?;
if let Some(answering_connection) = participant.answering_connection() {
if answering_connection == connection_id {
is_participant = true;
} else {
connection_ids.insert(answering_connection);
}
}
}
if !is_participant {
Err(anyhow!("not a room participant"))?;
}
Ok(connection_ids)
})
.await
}
async fn get_channel_room(
&self,
room_id: RoomId,
tx: &DatabaseTransaction,
) -> Result<(Option<channel::Model>, proto::Room)> {
let db_room = room::Entity::find_by_id(room_id)
.one(tx)
.await?
.context("could not find room")?;
let mut db_participants = db_roomView on GitHub (pinned to f4178619ac)