Skip to content

Commit

Permalink
fix: Map correct status values
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Dec 21, 2023
1 parent 3e8307e commit 2750d93
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions block-streamer/src/server/block_streamer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ impl BlockStreamerService {

fn match_status(grpc_status: i32) -> Result<registry_types::Status, Status> {
match grpc_status {
0 => Ok(registry_types::Status::Success),
1 => Ok(registry_types::Status::Fail),
2 => Ok(registry_types::Status::Any),
_ => Err(Status::invalid_argument(
"Invalid status value for ActionAnyRule",
)),
1 => Ok(registry_types::Status::Success),
2 => Ok(registry_types::Status::Fail),
3 => Ok(registry_types::Status::Any),
status => Err(Status::invalid_argument(format!(
"Invalid Status provided: {}",
status
))),
}
}
}
Expand Down

0 comments on commit 2750d93

Please sign in to comment.