diff --git a/netty/src/main/java/io/grpc/netty/NettyServerHandler.java b/netty/src/main/java/io/grpc/netty/NettyServerHandler.java index 45d8eec7e26..b4a49f4fb85 100644 --- a/netty/src/main/java/io/grpc/netty/NettyServerHandler.java +++ b/netty/src/main/java/io/grpc/netty/NettyServerHandler.java @@ -31,6 +31,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; +import com.google.common.base.Strings; import io.grpc.Attributes; import io.grpc.InternalMetadata; import io.grpc.InternalStatus; @@ -704,7 +705,7 @@ private NettyServerStream.TransportState serverStream(Http2Stream stream) { private Http2Exception newStreamException(int streamId, Throwable cause) { return Http2Exception.streamError( - streamId, Http2Error.INTERNAL_ERROR, cause, cause.getMessage()); + streamId, Http2Error.INTERNAL_ERROR, cause, Strings.nullToEmpty(cause.getMessage())); } private class FrameListener extends Http2FrameAdapter {