Here's the example that shows what I'm trying to achieve - https://github.com/cartmanez/grpc-java-by-example/tree/master/error-handling-example The idea is the following: I have a set of domain exception known by each microservice. There's a mapping domain exception <-> StatusRuntimeException Server automatically converts domain exception into StatusRuntimeException. That's done by server interceptor. And I'd like to convert it back to domain exception on the client side, so that calling code does not need to worry about StatusRuntimeException at all and only works with domain exceptions.
Thanks in advance. Regards, Eduard On Wednesday, February 14, 2018 at 10:01:36 PM UTC+3, Carl Mastrangelo wrote: > > No updates. If you can upload your code somewhere, it would be clearer > why the interceptor wouldn't work. > > On Friday, February 9, 2018 at 5:52:34 AM UTC-8, [email protected] wrote: >> >> Hi! >> >> Any updates on this? >> >> I checked version 1.9.0 and still don't see a way to do exception >> conversion in an interceptor. >> I now think of writing my own wrappers for all blocking stubs to perform >> exception conversion. That would allow not to check status codes across the >> application and just catch specific exceptions where needed. >> However, having the ability to define an exception transformer globally >> for grpc client would of course make life easier. >> >> Thanks >> > -- CONFIDENTIALITY NOTICE: This email and files attached to it are confidential. If you are not the intended recipient you are hereby notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email. -- 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 [email protected]. To post to this group, send email to [email protected]. 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/8679eb76-0cc1-4397-bb32-3c73eeb8dfc6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
