zed-industries/zed · error

{err:?}

Error message

{err:?}

What it means

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).

Source

Thrown at crates/call/src/call_impl/mod.rs:509

    ) -> Task<Result<()>> {
        if !self.pending_invites.insert(called_user_id) {
            return Task::ready(Err(anyhow!("user was already invited")));
        }
        cx.notify();

        if self._join_debouncer.running() {
            return Task::ready(Ok(()));
        }

        let room = if let Some(room) = self.room().cloned() {
            Some(Task::ready(Ok(room)).shared())
        } else {
            self.pending_room_creation.clone()
        };

        let invite = if let Some(room) = room {
            cx.spawn(async move |_, cx| {
                let room = room.await.map_err(|err| anyhow!("{err:?}"))?;

                let initial_project_id = if let Some(initial_project) = initial_project {
                    Some(
                        room.update(cx, |room, cx| room.share_project(initial_project, cx))
                            .await?,
                    )
                } else {
                    None
                };

                room.update(cx, move |room, cx| {
                    room.call(called_user_id, initial_project_id, cx)
                })
                .await?;

                anyhow::Ok(())
            })
        } else {

View on GitHub (pinned to bc538def45)

Solutions

  1. Read the inner {err:?} text - it names the real failure; fix that (re-authenticate, restore connectivity).
  2. Retry the invite after signing back in.
  3. Check collab server status if the cause is server-side.
Defensive patterns

Strategy: try-catch

Validate before calling

if !client.is_signed_in() || client.status() != ConnectionStatus::Connected {
    // re-authenticate / wait for reconnect before inviting
}

Try / catch

let result = call.update(cx, |c, cx| c.invite(user_id, project, cx)).await;
if let Err(err) = result {
    // the message is the Debug rendering of the room-creation failure:
    // parse the inner cause, re-auth if it mentions auth, retry once after reconnect
}

Prevention

When it happens

Trigger: 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.

Common situations: Inviting someone while signed out or with an expired session; collab endpoint blocked or down; server-side room creation errors.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/534516df059d371c. Report an issue: GitHub.