Skip to content

Commit

Permalink
refactor: use an invalid argument error
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Nov 29, 2024
1 parent 1307fb4 commit 02e0474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rs-dapi-client/src/transport/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl TransportClient for PlatformGrpcClient {
Some(settings),
|| match create_channel(uri.clone(), Some(settings)) {
Ok(channel) => Ok(Self::new(channel).into()),
Err(e) => Err(dapi_grpc::tonic::Status::failed_precondition(format!(
Err(e) => Err(dapi_grpc::tonic::Status::invalid_argument(format!(
"Channel creation failed: {}",
e
))),
Expand All @@ -81,7 +81,7 @@ impl TransportClient for CoreGrpcClient {
.get_or_create(PoolPrefix::Core, &uri, None, || {
match create_channel(uri.clone(), None) {
Ok(channel) => Ok(Self::new(channel).into()),
Err(e) => Err(dapi_grpc::tonic::Status::failed_precondition(format!(
Err(e) => Err(dapi_grpc::tonic::Status::invalid_argument(format!(
"Channel creation failed: {}",
e
))),
Expand All @@ -102,7 +102,7 @@ impl TransportClient for CoreGrpcClient {
Some(settings),
|| match create_channel(uri.clone(), Some(settings)) {
Ok(channel) => Ok(Self::new(channel).into()),
Err(e) => Err(dapi_grpc::tonic::Status::failed_precondition(format!(
Err(e) => Err(dapi_grpc::tonic::Status::invalid_argument(format!(
"Channel creation failed: {}",
e
))),
Expand Down

0 comments on commit 02e0474

Please sign in to comment.