Skip to content

Commit

Permalink
Fix gRPC trailers only response (#1209)
Browse files Browse the repository at this point in the history
Signed-off-by: Sri Krishna Paritala <[email protected]>
  • Loading branch information
srikrsna-buf authored Sep 4, 2024
1 parent e1e5613 commit 8eee2fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/connect/src/protocol-grpc/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ export function createTransport(opt: CommonTransportOptions): Transport {
);
validateTrailer(uRes.trailer, uRes.header);
if (message === undefined) {
// Trailers only response
if (headerError) {
throw headerError;
}
throw new ConnectError(
"protocol error: missing output message for unary method",
uRes.trailer.has(headerGrpcStatus)
Expand Down

0 comments on commit 8eee2fa

Please sign in to comment.