stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.37k stars 124 forks source link

Always check grpc status code and message #51

Closed overvenus closed 7 years ago

overvenus commented 7 years ago

This PR fixes an unexpected panic: A Foo server only supports service Foo. A Bar client sends a Bar request, then the client panics in grpc-rust/http2/src/futures_misc/stream_single.rs:36. This PR always checks grpc status code and message, convert them into a GrpcMessageError instead of panic.

A gRPC server sends responses with a status code and message that indicates error types, but the http status code is still 200.

stepancheg commented 7 years ago

Thanks!