{"record":{"id":"3347b59d04958314","repo":"zed-industries/zed","slug":"no-such-project","errorCode":null,"errorMessage":"no such project","messagePattern":"no such project","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/collab/src/db/queries/rooms.rs","lineNumber":510,"sourceCode":"                    ))),\n                    answering_connection_lost: ActiveValue::set(false),\n                    ..Default::default()\n                })\n                .exec(&*tx)\n                .await?;\n            if participant_update.rows_affected == 0 {\n                return Err(anyhow!(\"room does not exist or was already joined\"))?;\n            }\n\n            let mut reshared_projects = Vec::new();\n            for reshared_project in &rejoin_room.reshared_projects {\n                let project_id = ProjectId::from_proto(reshared_project.project_id);\n                let project = project::Entity::find_by_id(project_id)\n                    .one(&*tx)\n                    .await?\n                    .context(\"project does not exist\")?;\n                if project.host_user_id != Some(user_id) {\n                    return Err(anyhow!(\"no such project\"))?;\n                }\n\n                let mut collaborators = project\n                    .find_related(project_collaborator::Entity)\n                    .all(&*tx)\n                    .await?;\n                let host_ix = collaborators\n                    .iter()\n                    .position(|collaborator| {\n                        collaborator.user_id == user_id && collaborator.is_host\n                    })\n                    .context(\"host not found among collaborators\")?;\n                let host = collaborators.swap_remove(host_ix);\n                let old_connection_id = host.connection();\n\n                project::Entity::update(project::ActiveModel {\n                    host_connection_id: ActiveValue::set(Some(connection.id as i32)),\n                    host_connection_server_id: ActiveValue::set(Some(ServerId(","sourceCodeStart":492,"sourceCodeEnd":528,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/collab/src/db/queries/rooms.rs#L492-L528","documentation":"Thrown in rejoin_room while re-registering a returning participant's reshared projects: a project_id in rejoin_room.reshared_projects no longer exists in the room's server-side project list, so the re-share cannot be applied. Fires when a client rejoins with stale project state.","triggerScenarios":"Thrown at crates/collab/src/db/queries/rooms.rs:510 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove stale project IDs from the rejoin request","Verify the projects still exist before rejoining"],"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-23T08:17:48.524Z"}