Skip to content

Commit

Permalink
Merge pull request #640 from tursodatabase/remove-unwrap-write-proxy
Browse files Browse the repository at this point in the history
remove unwrap in write proxy
  • Loading branch information
MarinPostma authored Nov 17, 2023
2 parents b6be623 + 072120e commit 43e150e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libsql-server/src/connection/write_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libsql-server/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 43e150e

Please sign in to comment.