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.
It seems like "Response::new" sets the status code 2 => which means unknown.
Client libraries expect 0 => 0K which does colide here.
Is it possible to set the code manually within the response?
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
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 sendStatus::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: