ScalaPB icon indicating copy to clipboard operation
ScalaPB copied to clipboard

Unknown internal exceptions are mapped differently when response is streamed

Open donce opened this issue 4 months ago • 2 comments

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.

donce avatar Aug 19 '25 13:08 donce

Thanks for reporting and looking into this. Will you be able to work on a PR?

thesamet avatar Aug 21 '25 03:08 thesamet

No worries, thanks for a quick reply, but unfortunately I won't be able to fix this in the near future.

donce avatar Aug 21 '25 10:08 donce