You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux 6.5.0-21-generic #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Description
Received Status.source field is None even though it is Some when sent from the server.
Situation:
GRPC server built with tonic-build encounters an error err and returns a tonic::Status with source: err, the client, (also built with tonic-build) receives the Status but the source is None.
I expected the source field of the received Status on the client's side to be populated with the same information that was sent from the client.
Below is a demo server and client cargo project as a zip file, the server.rs and client.rs files are also below for reference, along with their output.
The server simply returns a Status where the source of the status has been set.
To run the demo to reproduce, extract the zip, from within the zip;
run cargo run --bin server in one terminal.
run cargo run --bin client in another terminal.
See that the log message from the client states received error: Status {..., source: None } however the log in the server shows sending error: Status {..., source: Some(Custom ...)}
Bug Report
Version
tonic v0.11.0
tonic-build v0.11.0
Platform
Linux 6.5.0-21-generic #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Description
Received Status.source field is None even though it is Some when sent from the server.
Situation:
GRPC server built with tonic-build encounters an error
err
and returns atonic::Status
withsource: err
, the client, (also built with tonic-build) receives the Status but thesource
isNone
.I expected the
source
field of the received Status on the client's side to be populated with the same information that was sent from the client.Below is a demo server and client cargo project as a zip file, the
server.rs
andclient.rs
files are also below for reference, along with their output.The server simply returns a Status where the source of the status has been set.
To run the demo to reproduce, extract the zip, from within the zip;
cargo run --bin server
in one terminal.cargo run --bin client
in another terminal.See that the log message from the client states
received error: Status {..., source: None }
however the log in the server showssending error: Status {..., source: Some(Custom ...)}
tonic_status_source_bug_demo.zip
server.rs
client.rs
Server output:
Client output:
The text was updated successfully, but these errors were encountered: