Skip to content

Commit

Permalink
[refactor] Explicitly managing error
Browse files Browse the repository at this point in the history
Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Oct 31, 2024
1 parent 0784019 commit 346d035
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/filter/http_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,15 @@ impl Context for Filter {
match op_res {
Ok(operation) => {
if GrpcService::process_grpc_response(operation, resp_size).is_ok() {
if let Ok(Some(_op)) = self.operation_dispatcher.borrow_mut().next() {
} else {
self.resume_http_request()
// call the next op
match self.operation_dispatcher.borrow_mut().next() {
Ok(_) => {} // no action needed
Err(op_err) => {
// If desired, we could check the error status.
GrpcService::handle_error_on_grpc_response(op_err.failure_mode);
}
}
self.resume_http_request();
}
}
Err(e) => {
Expand Down

0 comments on commit 346d035

Please sign in to comment.