grpc / grpc/grpc-rust

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

Open
#1,716 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## 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](https://github.com/hyperium/tonic/assets/2421850/0b6ffb60-8aa6-443e-91f0-a1dc5ab0b2ec)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.