Skip to content

Commit 8e900cb

Browse files
bors[bot]Manuel Ceron
andauthored
Merge #8397
8397: Return proper error code when server is loading r=matklad a=ceronman When requests are made to rust-analyzer and the server is still loading, a response error is returned with the code `ContentModified` and text `"Rust Analyzer is still loading..."`. This error code doesn't seem to be the more appropriate for this situation. Using `ServerNotInitialized` seems better. As this is such a small change, I have not created an issue for it. Co-authored-by: Manuel Ceron <manuel.ceron@jetbrains.com>
2 parents 45510ae + dbd7600 commit 8e900cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl GlobalState {
484484
req.id,
485485
// FIXME: i32 should impl From<ErrorCode> (from() guarantees lossless conversion)
486486
lsp_server::ErrorCode::ContentModified as i32,
487-
"Rust Analyzer is still loading...".to_owned(),
487+
"waiting for cargo metadata or cargo check".to_owned(),
488488
));
489489
return Ok(());
490490
}

0 commit comments

Comments
 (0)