{"record":{"id":"6f8f795e9ca7b9f8","repo":"zed-industries/zed","slug":"invite-request-already-in-progress","errorCode":null,"errorMessage":"invite request already in progress","messagePattern":"invite request already in progress","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/channel/src/channel_store.rs","lineNumber":640,"sourceCode":"                .request(proto::SetChannelVisibility {\n                    channel_id: channel_id.0,\n                    visibility: visibility.into(),\n                })\n                .await?;\n\n            Ok(())\n        })\n    }\n\n    pub fn invite_member(\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!(\"invite 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::InviteChannelMember {\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":622,"sourceCodeEnd":658,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/channel/src/channel_store.rs#L622-L658","documentation":"ChannelStore::invite_member uses the outgoing_invites set as a re-entrancy guard keyed by (channel_id, user_id); the error fires when an invite for that pair is already in flight, meaning a duplicate concurrent request — not a server rejection — was intercepted locally before any network call.","triggerScenarios":"Thrown at crates/channel/src/channel_store.rs:640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the pending invite to finish before inviting the same user again","Disable the invite button for that user while the request is in flight","On failure paths ensure the guard entry is cleared so the invite can be retried"],"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"}