{"record":{"id":"361616f423e0c130","repo":"zed-industries/zed","slug":"member-request-already-in-progress","errorCode":null,"errorMessage":"member request already in progress","messagePattern":"member request already in progress","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/channel/src/channel_store.rs","lineNumber":702,"sourceCode":"\n            this.update(cx, |this, cx| {\n                this.outgoing_invites.remove(&(channel_id, user_id));\n                cx.notify();\n            })?;\n            result?;\n            Ok(())\n        })\n    }\n\n    pub fn set_member_role(\n        &mut self,\n        channel_id: ChannelId,\n        user_id: LegacyUserId,\n        role: proto::ChannelRole,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        if !self.outgoing_invites.insert((channel_id, user_id)) {\n            return Task::ready(Err(anyhow!(\"member request already in progress\")));\n        }\n\n        cx.notify();\n        let client = self.client.clone();\n        cx.spawn(async move |this, cx| {\n            let result = client\n                .request(proto::SetChannelMemberRole {\n                    channel_id: channel_id.0,\n                    user_id,\n                    role: role.into(),\n                })\n                .await;\n\n            this.update(cx, |this, cx| {\n                this.outgoing_invites.remove(&(channel_id, user_id));\n                cx.notify();\n            })?;\n","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/channel/src/channel_store.rs#L684-L720","documentation":"ChannelStore::set_member_role reuses the outgoing_invites set as a guard keyed by (channel_id, user_id); the error means a role change (or invite) for that member is already in flight, so the duplicate request is rejected locally before hitting the server.","triggerScenarios":"Thrown at crates/channel/src/channel_store.rs:702 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the in-flight member request to settle before changing the role again","Debounce or disable role-change UI for that member while a request is pending","Ensure the guard entry is removed on completion/failure so subsequent requests can proceed"],"exampleFix":null,"handlingStrategy":"type-guard","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"}