I try to find out how the exception handling mechanism in gRPC works.
Are there any other ways except try-catch block to handle runtime exceptions such as IllegalArgumentException
on server side?
For example, I have some gRPC streaming-client service, where the method onNext
throws IllegalArgumentException
in cases when passed parameters are not satisfied some asserts on the deep level (in some library, e.g. com.google.common.base.Preconditions
).
In this case there will be StatusRuntimeException
with Status.UNKNOWN
on the client side but is there another solution that allows not to handle such exceptions and convert them after service call to readable StatusRuntimeException
?