Adding a ClientInterceptor to wrap StatusException with a custom exception #491
Unanswered
nehme-bilal-ah
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am looking to add a ClientInterceptor to wrap any StatusException's thrown by downstream service with a custom exception (e.g. ApiClientException). This allows me to capture the full stacktrace of where the exception was thrown from for debugging purposes.
I looked at implementing
ClientInterceptor
interface and injecting that interceptor but I am not sure how to wrap GRPC calls with a try/catch and re-throw a different exception. I would appreciate it if someone could provide an example.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions