mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Notify users instead of logging generic lsp errors
This commit is contained in:
parent
1b83020dc8
commit
1e697cae78
1 changed files with 9 additions and 0 deletions
|
@ -3486,6 +3486,7 @@ impl LspStore {
|
|||
let lsp_request = language_server.request::<R::LspRequest>(lsp_params);
|
||||
|
||||
let id = lsp_request.id();
|
||||
|
||||
let _cleanup = if status.is_some() {
|
||||
cx.update(|cx| {
|
||||
this.update(cx, |this, cx| {
|
||||
|
@ -3525,11 +3526,19 @@ impl LspStore {
|
|||
let result = lsp_request.await;
|
||||
|
||||
let response = result.map_err(|err| {
|
||||
cx.update(|cx| {
|
||||
this.update(cx, |_, cx| {
|
||||
cx.emit(LspStoreEvent::Notification(err.to_string()));
|
||||
})
|
||||
})
|
||||
.log_err();
|
||||
|
||||
log::warn!(
|
||||
"Generic lsp request to {} failed: {}",
|
||||
language_server.name(),
|
||||
err
|
||||
);
|
||||
|
||||
err
|
||||
})?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue