Separate timeout and connection dropped errors out (#30457)

This commit is contained in:
Kirill Bulatov 2025-05-10 15:12:58 +03:00 committed by GitHub
parent 39da72161f
commit 471e02d48f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 313 additions and 115 deletions

View file

@ -452,7 +452,12 @@ impl Prettier {
})?
.context("prettier params calculation")?;
let response = local.server.request::<Format>(params).await?;
let response = local
.server
.request::<Format>(params)
.await
.into_response()
.context("prettier format")?;
let diff_task = buffer.update(cx, |buffer, cx| buffer.diff(response.text, cx))?;
Ok(diff_task.await)
}
@ -482,6 +487,7 @@ impl Prettier {
.server
.request::<ClearCache>(())
.await
.into_response()
.context("prettier clear cache"),
#[cfg(any(test, feature = "test-support"))]
Self::Test(_) => Ok(()),