Skip to content

Commit

Permalink
[keyserver] improve error messages in rust-node-addon
Browse files Browse the repository at this point in the history
Summary:
add a more detailed message in case an error is caught.

Depends on D8298

Test Plan: ran keyserver but not identity service to get errors connecting to identity. saw better error logs

Reviewers: jon, bartek

Reviewed By: jon

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8299
  • Loading branch information
vdhanan committed Jun 27, 2023
1 parent b97e7a8 commit 8e11f2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn add_reserved_username(
identity_client
.add_reserved_username(add_reserved_username_request)
.await
.map_err(|_| Error::from_status(Status::GenericFailure))?
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?
.into_inner();

Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn remove_reserved_username(
identity_client
.remove_reserved_username(remove_reserved_username_request)
.await
.map_err(|_| Error::from_status(Status::GenericFailure))?
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?
.into_inner();

Ok(())
Expand Down

0 comments on commit 8e11f2d

Please sign in to comment.