ScalaPB
ScalaPB copied to clipboard
Unknown internal exceptions are mapped differently when response is streamed
For Unary methods, if you throw an exception which is not SRE/SE (e.g. throw new NullPointerException()), it is wrapped to SRE Internal exception. This happens here: scalapb.grpc.Grpc.completeObserver
When you operate with ResponseObserver (e.g. server streaming method), and pass the same exception (e.g. responseObserver.onError(new NullPointerException())), you end up with Unknown SRE instead of Internal, because such exceptions are not mapped.
Thanks for reporting and looking into this. Will you be able to work on a PR?
No worries, thanks for a quick reply, but unfortunately I won't be able to fix this in the near future.