Skip to content

Commit 5abcc13

Browse files
improve error handling supabase-community#2
1 parent 577d0f9 commit 5abcc13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/pg_lsp/src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ impl Server {
216216
|| self
217217
.db_conn
218218
.as_ref()
219+
// if the connection is already connected to the same database, do nothing
219220
.is_some_and(|c| c.connected_to(options.db_connection_string.as_ref().unwrap()))
220221
{
221222
return Ok(());
@@ -257,8 +258,7 @@ impl Server {
257258
.listen_for_schema_updates(move |schema_cache| {
258259
internal_tx
259260
.send(InternalMessage::SetSchemaCache(schema_cache))
260-
.unwrap();
261-
// TODO: handle result
261+
.expect("LSP Server: Failed to send internal message.");
262262
})
263263
.await?;
264264

0 commit comments

Comments
 (0)