{"record":{"id":"534516df059d371c","repo":"zed-industries/zed","slug":"err","errorCode":null,"errorMessage":"{err:?}","messagePattern":"\\{err:\\?\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/call/src/call_impl/mod.rs","lineNumber":509,"sourceCode":"    ) -> Task<Result<()>> {\n        if !self.pending_invites.insert(called_user_id) {\n            return Task::ready(Err(anyhow!(\"user was already invited\")));\n        }\n        cx.notify();\n\n        if self._join_debouncer.running() {\n            return Task::ready(Ok(()));\n        }\n\n        let room = if let Some(room) = self.room().cloned() {\n            Some(Task::ready(Ok(room)).shared())\n        } else {\n            self.pending_room_creation.clone()\n        };\n\n        let invite = if let Some(room) = room {\n            cx.spawn(async move |_, cx| {\n                let room = room.await.map_err(|err| anyhow!(\"{err:?}\"))?;\n\n                let initial_project_id = if let Some(initial_project) = initial_project {\n                    Some(\n                        room.update(cx, |room, cx| room.share_project(initial_project, cx))\n                            .await?,\n                    )\n                } else {\n                    None\n                };\n\n                room.update(cx, move |room, cx| {\n                    room.call(called_user_id, initial_project_id, cx)\n                })\n                .await?;\n\n                anyhow::Ok(())\n            })\n        } else {","sourceCodeStart":491,"sourceCodeEnd":527,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/call/src/call_impl/mod.rs#L491-L527","documentation":"During invite, if no room exists the call reuses the shared pending_room_creation task; when that task resolves to Err, the failure is re-wrapped as anyhow!(\"{err:?}\"), so the message is the Debug rendering of the underlying room-creation error (auth, network, or server-side).","triggerScenarios":"room.await fails inside the invite spawn - collab server unreachable, session expired or signed out, room creation rejected - and the debug-formatted cause becomes the invite's error message.","commonSituations":"Inviting someone while signed out or with an expired session; collab endpoint blocked or down; server-side room creation errors.","solutions":["Read the inner {err:?} text - it names the real failure; fix that (re-authenticate, restore connectivity).","Retry the invite after signing back in.","Check collab server status if the cause is server-side."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if !client.is_signed_in() || client.status() != ConnectionStatus::Connected {\n    // re-authenticate / wait for reconnect before inviting\n}","typeGuard":null,"tryCatchPattern":"let result = call.update(cx, |c, cx| c.invite(user_id, project, cx)).await;\nif let Err(err) = result {\n    // the message is the Debug rendering of the room-creation failure:\n    // parse the inner cause, re-auth if it mentions auth, retry once after reconnect\n}","preventionTips":["Ensure the collab session is authenticated before invites","Retry invites on reconnect events, not on a timer","Log the inner cause with context rather than surfacing the raw Debug string"],"tags":["call","invite","collab","auth","network"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}