Skip to content

Commit

Permalink
Grpc-lwt: fetch status code from response header
Browse files Browse the repository at this point in the history
  • Loading branch information
acerone85 committed May 4, 2024
1 parent e066812 commit 695d451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/grpc-lwt/client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ let call ~service ~rpc ?(scheme = "https") ~handler ~(do_request : do_request)
match response.status with
| `OK ->
let+ status =
match H2.Headers.get headers "grpc-status" with
| Some _ -> Lwt.return (Grpc.Status.extract_status headers)
match H2.Headers.get response.headers "grpc-status" with
| Some _ -> Lwt.return (Grpc.Status.extract_status response.headers)
| None -> status
in
Ok (handler_res, status)
Expand Down

0 comments on commit 695d451

Please sign in to comment.