1. server side can
1.1. throw rpcException with status and meta data filled in trailers
or,
1.2 set status and trailers to ServerCallContext;
2. client will need to catch rpcException to act upon failure situations, no matter server raised failure via 1.1 or 1.2, because client side library will create rpcException using status and trailers received, and throw.
[Q] for heavy and perf critical APP, exception dispatching is also a perf concern, is it possible to avoid throwing rpcException? (especially on client side). With that, the Application layer code can look into the status code to act as appropriately?
thanks