connectrpc / connect-es

The TypeScript implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/
Apache License 2.0
1.39k stars 82 forks source link

Fix gRPC-Web trailers-only response handling for server-streaming RPCs #1261

Closed timostamm closed 1 month ago

timostamm commented 1 month ago

gRPC-Web supports "trailers-only" responses - error responses with an empty body, that have all trailer fields in the response headers.

The gRPC-Web transport from @connectrpc/connect-web has a bug handling these responses: It raises an error as expected for unary RPCs, but it does not raise an error for server-streaming RPCs.

The next release of the conformance test suite will include tests for this case (added in https://github.com/connectrpc/conformance/pull/935).