Hello, I was working on a grpc server based project, I have a proto which has updated through different versions. As I was testing my server from different aspect. It was evident that when a call is made on server from a older version of proto, server throws error:
Mar 08, 2018 12:57:49 AM io.grpc.internal.SerializingExecutor run SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1@4e158ee6 io.grpc.StatusRuntimeException: INTERNAL: Invalid protobuf byte sequence at io.grpc.Status.asRuntimeException(Status.java:517) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:165) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:79) at io.grpc.MethodDescriptor.parseRequest(MethodDescriptor.java:280) at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:252) at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1.runInContext(ServerImpl.java:576) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag. at com.google.protobuf.InvalidProtocolBufferException.invalidEndTag(InvalidProtocolBufferException.java:106) at com.google.protobuf.CodedInputStream$ArrayDecoder.checkLastTagWas(CodedInputStream.java:559) at com.google.protobuf.CodedInputStream$ArrayDecoder.readMessage(CodedInputStream.java:817) at com.mediaiq.caps.platform.Event.<init>(Event.java:57) at com.mediaiq.caps.platform.Event.<init>(Event.java:9) at com.mediaiq.caps.platform.Event$1.parsePartialFrom(Event.java:849) at com.mediaiq.caps.platform.Event$1.parsePartialFrom(Event.java:844) at com.google.protobuf.CodedInputStream$ArrayDecoder.readMessage(CodedInputStream.java:816) at com.mediaiq.caps.platform.PublishRequest.<init>(PublishRequest.java:57) at com.mediaiq.caps.platform.PublishRequest.<init>(PublishRequest.java:9) at com.mediaiq.caps.platform.PublishRequest$1.parsePartialFrom(PublishRequest.java:668) at com.mediaiq.caps.platform.PublishRequest$1.parsePartialFrom(PublishRequest.java:663) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:91) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parseFrom(ProtoLiteUtils.java:170) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:162) ... 9 more While the client gets error io.grpc.StatusRuntimeException: UNKNOWN I want the client side error to be more descriptive as why the call failed and what proto to use .I tried interceptor for catching the error, but the error does not get catch by interceptor. Is there any way to catch this error and modify the error for proper error handling. PS. The Sample two proto verions are Version 1.0: service EchoService { rpc Echo(SimpleMessage) returns (SimpleMessage) {} } message SimpleMessage { string id = 1; } Version 2.0: service EchoService { rpc Echo(SimpleMessage) returns (SimpleMessage) {} } message SimpleMessage { int64 id = 1; } -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/9077828b-b214-4d88-96fb-a7482d6bd9f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.