Compression handling uses wrong error codes
Open
spec
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 802
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Description
According to the [gRPC docs for compression](https://github.com/grpc/grpc/blob/master/doc/compression.md), when a server sends a response using an unrecognized/unsupported encoding the client MUST report the error with an `internal` error code. (See bullet 5 in the test cases section of that doc.)
Similarly, when a server sends a message where the envelope has the “compressed” bit set, but there is no encoding for the stream (or the encoding is “identity”), the recipient MUST fail with an `internal` error code.
The client in this package returns an `unknown` error in both of these situations instead of `internal`.
Contributor guide
Assessment
This issue has not been assessed yet.