Skip to content

Commit

Permalink
Merge branch 'v1.0' into micn/hermitize-mcp
Browse files Browse the repository at this point in the history
* v1.0:
  remove use of bare unwrap() in error propagation (#600)
  • Loading branch information
michaelneale committed Jan 16, 2025
2 parents 512146b + 4860adb commit 9d3e54c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/mcp-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ where
.call(request)
.await
.map_err(|e| Error::McpServerError {
server: self.server_info.as_ref().unwrap().name.clone(),
server: self
.server_info
.as_ref()
.map(|s| s.name.clone())
.unwrap_or("".to_string()),
method: method.to_string(),
// we don't need include params because it can be really large
source: Box::new(e.into()),
Expand Down Expand Up @@ -205,7 +209,11 @@ where
.call(notification)
.await
.map_err(|e| Error::McpServerError {
server: self.server_info.as_ref().unwrap().name.clone(),
server: self
.server_info
.as_ref()
.map(|s| s.name.clone())
.unwrap_or("".to_string()),
method: method.to_string(),
// we don't need include params because it can be really large
source: Box::new(e.into()),
Expand Down

0 comments on commit 9d3e54c

Please sign in to comment.