tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Response::new does not send grpc-status code correctly

Open heartforit opened this issue 8 months ago • 1 comments

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: Screenshot_github

heartforit avatar May 29 '24 15:05 heartforit