{"record":{"id":"22662b27a715358f","repo":"zed-industries/zed","slug":"can-only-send-project-updates-to-a-project-you-re","errorCode":null,"errorMessage":"can only send project updates to a project you're in","messagePattern":"can only send project updates to a project you're in","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/collab/src/db/queries/projects.rs","lineNumber":1268,"sourceCode":"\n        let mut connection_ids = HashSet::default();\n        if let Some(host_connection) = project.host_connection().log_err()\n            && !exclude_dev_server\n        {\n            connection_ids.insert(host_connection);\n        }\n\n        while let Some(collaborator) = collaborators.next().await {\n            let collaborator = collaborator?;\n            connection_ids.insert(collaborator.connection());\n        }\n\n        if connection_ids.contains(&connection_id)\n            || Some(connection_id) == project.host_connection().ok()\n        {\n            Ok(connection_ids)\n        } else {\n            Err(anyhow!(\n                \"can only send project updates to a project you're in\"\n            ))?\n        }\n    }\n\n    async fn project_guest_connection_ids(\n        &self,\n        project_id: ProjectId,\n        tx: &DatabaseTransaction,\n    ) -> Result<Vec<ConnectionId>> {\n        let mut collaborators = project_collaborator::Entity::find()\n            .filter(\n                project_collaborator::Column::ProjectId\n                    .eq(project_id)\n                    .and(project_collaborator::Column::IsHost.eq(false)),\n            )\n            .stream(tx)\n            .await?;","sourceCodeStart":1250,"sourceCodeEnd":1286,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/collab/src/db/queries/projects.rs#L1250-L1286","documentation":"internal_project_connection_ids collects the host and collaborator connections for a project and asserts the requesting connection is among them; this sentinel fires when a connection asks for the participant list of a project it never joined.","triggerScenarios":"Thrown at crates/collab/src/db/queries/projects.rs:1268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Join the project before requesting its connection IDs","Verify the project_id is one the connection collaborates on"],"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"}