{"record":{"id":"9df9530ed6c0e0e5","repo":"zed-industries/zed","slug":"could-not-update-room-participant-location","errorCode":null,"errorMessage":"could not update room participant location","messagePattern":"could not update room participant location","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/collab/src/db/queries/rooms.rs","lineNumber":1119,"sourceCode":"                        )\n                        .add(\n                            room_participant::Column::AnsweringConnectionServerId\n                                .eq(connection.owner_id as i32),\n                        ),\n                )\n                .set(room_participant::ActiveModel {\n                    location_kind: ActiveValue::set(Some(location_kind)),\n                    location_project_id: ActiveValue::set(location_project_id),\n                    ..Default::default()\n                })\n                .exec(&*tx)\n                .await?;\n\n            if result.rows_affected == 1 {\n                let room = self.get_room(room_id, &tx).await?;\n                Ok(room)\n            } else {\n                Err(anyhow!(\"could not update room participant location\"))?\n            }\n        })\n        .await\n    }\n\n    /// Sets the role of a participant in the given room.\n    pub async fn set_room_participant_role(\n        &self,\n        admin_id: UserId,\n        room_id: RoomId,\n        user_id: UserId,\n        role: ChannelRole,\n    ) -> Result<TransactionGuard<proto::Room>> {\n        self.room_transaction(room_id, |tx| async move {\n            room_participant::Entity::find()\n                .filter(\n                    Condition::all()\n                        .add(room_participant::Column::RoomId.eq(room_id))","sourceCodeStart":1101,"sourceCodeEnd":1137,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/collab/src/db/queries/rooms.rs#L1101-L1137","documentation":"update_room_participant_location runs an UPDATE on the participant row matched by room, user, and answering connection; zero rows affected means the participant row was missing or the connection no longer matched, so the location update silently matched nothing and is reported as a failure.","triggerScenarios":"Thrown at crates/collab/src/db/queries/rooms.rs:1119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rejoin the room to re-establish the participant row","Verify the connection ID still belongs to the participant (not reconnect-lost)"],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}