{"record":{"id":"bb2208a1e57dc4a9","repo":"zed-industries/zed","slug":"not-room-participants","errorCode":null,"errorMessage":"not room participants","messagePattern":"not room participants","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/collab/src/db/queries/projects.rs","lineNumber":1332,"sourceCode":"            use room_participant::Column;\n\n            let count = room_participant::Entity::find()\n                .filter(\n                    Condition::all().add(Column::RoomId.eq(room_id)).add(\n                        Condition::any()\n                            .add(Column::AnsweringConnectionId.eq(leader_id.id as i32).and(\n                                Column::AnsweringConnectionServerId.eq(leader_id.owner_id as i32),\n                            ))\n                            .add(Column::AnsweringConnectionId.eq(follower_id.id as i32).and(\n                                Column::AnsweringConnectionServerId.eq(follower_id.owner_id as i32),\n                            )),\n                    ),\n                )\n                .count(&*tx)\n                .await?;\n\n            if count < 2 {\n                Err(anyhow!(\"not room participants\"))?;\n            }\n\n            Ok(())\n        })\n        .await\n    }\n\n    /// Adds the given follower connection as a follower of the given leader connection.\n    pub async fn follow(\n        &self,\n        room_id: RoomId,\n        project_id: ProjectId,\n        leader_connection: ConnectionId,\n        follower_connection: ConnectionId,\n    ) -> Result<TransactionGuard<proto::Room>> {\n        self.room_transaction(room_id, |tx| async move {\n            follower::ActiveModel {\n                room_id: ActiveValue::set(room_id),","sourceCodeStart":1314,"sourceCodeEnd":1350,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/collab/src/db/queries/projects.rs#L1314-L1350","documentation":"check_room_participants counts room_participant rows for the leader and follower connections in the given room; when the count is short, at least one of the two connections is not a participant, and the sentinel 'not room participants' is returned.","triggerScenarios":"Thrown at crates/collab/src/db/queries/projects.rs:1332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure both leader and follower have joined the room before the operation","Retry after both participants are registered in the room"],"exampleFix":null,"handlingStrategy":"validation","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"}