diff --git a/libsql-server/src/connection/write_proxy.rs b/libsql-server/src/connection/write_proxy.rs index ea08227424..edcf10b6a5 100644 --- a/libsql-server/src/connection/write_proxy.rs +++ b/libsql-server/src/connection/write_proxy.rs @@ -287,7 +287,7 @@ impl RemoteConnection { req.metadata_mut() .insert_bin(NAMESPACE_METADATA_KEY, namespace); auth.upgrade_grpc_request(&mut req); - let response_stream = client.stream_exec(req).await.unwrap().into_inner(); + let response_stream = client.stream_exec(req).await?.into_inner(); Ok(Self { response_stream, diff --git a/libsql-server/src/error.rs b/libsql-server/src/error.rs index ae96442fc6..b08ce3a862 100644 --- a/libsql-server/src/error.rs +++ b/libsql-server/src/error.rs @@ -22,7 +22,7 @@ pub enum Error { #[error("Failed to execute query via RPC. Error code: {}, message: {}", .0.code, .0.message)] RpcQueryError(crate::rpc::proxy::rpc::Error), #[error("Failed to execute queries via RPC protocol: `{0}`")] - RpcQueryExecutionError(tonic::Status), + RpcQueryExecutionError(#[from] tonic::Status), #[error("Database value error: `{0}`")] DbValueError(String), // Dedicated for most generic internal errors. Please use it sparingly.