zed-industries/zed · error
{err:?}
Error message
{err:?} What it means
In sign_in, the device/token exchange task failed and its error (an Arc<str> from the sign-in flow) is re-wrapped with Debug formatting; the underlying cause is shown in the message. This surfaces whatever broke the sign-in attempt (network, GitHub denial, token rejection).
Solutions
- Read the wrapped error text to identify the failing sign-in step
- Check GitHub connectivity and credentials, then retry sign-in
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/copilot/src/copilot.rs:810 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/70060bb2f3a817ac.
Report an issue: GitHub.
Appendix: source
Thrown at crates/copilot/src/copilot.rs:810
this.update_sign_in_status(
request::SignInStatus::NotSignedIn,
cx,
);
Err(Arc::new(error))
}
})?
})
.shared();
server.sign_in_status = SignInStatus::SigningIn {
prompt: None,
task: task.clone(),
};
cx.notify();
task
}
};
cx.background_spawn(task.map_err(|err| anyhow!("{err:?}")))
} else {
// If we're downloading, wait until download is finished
// If we're in a stuck state, display to the user
Task::ready(Err(anyhow!("copilot hasn't started yet")))
}
}
pub fn sign_out(&mut self, cx: &mut Context<Self>) -> Task<Result<()>> {
self.update_sign_in_status(request::SignInStatus::NotSignedIn, cx);
match &self.server {
CopilotServer::Running(RunningCopilotServer { lsp: server, .. }) => {
let request_timeout = ProjectSettings::get_global(cx)
.global_lsp_settings
.get_request_timeout();
let server = server.clone();
cx.background_spawn(async move {
serverView on GitHub (pinned to f4178619ac)