Skip to content

Commit

Permalink
web: fix invalid bit header error message (#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco authored Feb 1, 2024
1 parent c30cb78 commit 227b169
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tonic-web/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@ fn find_trailers(buf: &[u8]) -> Result<FindTrailers, Status> {
}

if !(header == 0 || header == 1) {
return Err(Status::internal("Invalid header bit {} expected 0 or 1"));
return Err(Status::internal(format!(
"Invalid header bit {} expected 0 or 1",
header
)));
}

let msg_len = temp_buf.get_u32();
Expand Down

0 comments on commit 227b169

Please sign in to comment.