zed-industries/zed · error
cannot call a user who isn't a contact
Error message
cannot call a user who isn't a contact
What it means
Guard in the `call` RPC handler: it fires when has_contact(calling_user_id, called_user_id) returns false, i.e. the two users have no accepted contact relationship in the database. Calling another user into a room is only permitted between contacts.
Solutions
- Send a contact request and wait for acceptance before calling
- Call an existing contact instead
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/collab/src/rpc.rs:1754 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/8ea0358c0d549950.
Report an issue: GitHub.
Appendix: source
Thrown at crates/collab/src/rpc.rs:1761
}
/// Call someone else into the current room
async fn call(
request: proto::Call,
response: Response<proto::Call>,
session: MessageContext,
) -> Result<()> {
let room_id = RoomId::from_proto(request.room_id);
let calling_user_id = session.user_id();
let calling_connection_id = session.connection_id;
let called_user_id = UserId::from_proto(request.called_user_id);
let initial_project_id = request.initial_project_id.map(ProjectId::from_proto);
if !session
.db()
.await
.has_contact(calling_user_id, called_user_id)
.await?
{
return Err(anyhow!("cannot call a user who isn't a contact"))?;
}
let incoming_call = {
let (room, incoming_call) = &mut *session
.db()
.await
.call(
room_id,
calling_user_id,
calling_connection_id,
called_user_id,
initial_project_id,
)
.await?;
room_updated(room, &session.peer);
mem::take(incoming_call)
};View on GitHub (pinned to 9d272b0363)