tonic
tonic copied to clipboard
Response::new does not send grpc-status code correctly
Bug Report
Grpc-web won't work with tonic. It does not send the grpc-status header correctly when only using Response::new which leads on the js client side to the error "Error: Response closed without grpc-status (Headers only)"
Version
- tonic v0.11.0
- tonic-async-interceptor v0.11.1
Platform
Windows 11 64bit
Description
I tried to run Response::new(someType)
it returns the data correctly but won't set the header.
However if I send Status::invalid_argument("Name cannot be empty")
Things work out just as intended.
My question is: Is this defined behavior? Because the client expects a status code. If this is not needed the client library should ignore this case then.
Here is a screenshot from the problem: