From 2b3b49dc8fc2f38807f763c5ca4d6f883ae93d7e Mon Sep 17 00:00:00 2001 From: Sri Krishna Paritala Date: Wed, 4 Sep 2024 09:36:15 +0530 Subject: [PATCH] Fix gRPC trailers only response Signed-off-by: Sri Krishna Paritala --- packages/connect/src/protocol-grpc/transport.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/connect/src/protocol-grpc/transport.ts b/packages/connect/src/protocol-grpc/transport.ts index 689bdf5c8..57d1662f1 100644 --- a/packages/connect/src/protocol-grpc/transport.ts +++ b/packages/connect/src/protocol-grpc/transport.ts @@ -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)