grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.45k stars 760 forks source link

Compression handling uses wrong error codes #1428

Open jhump opened 1 month ago

jhump commented 1 month ago

According to the gRPC docs for compression, 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.

sampajano commented 1 month ago

@jhump Thanks a lot for reporting! Will take a look soon!