-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
I think I'm looking for something like Interceptor except I want to intercept the Response and not the Request.
Essentially I'd like to inspect the gRPC error (if any) and ensure it does not contain sensitive information. As an example, wiping the error message if the code indicates internal error. This would be much easier to do as a tower layer; at the moment we're manually ensuring this is the case in every error variant and mapping, however this isn't possible to properly police or enforce.
We also have internal gRPC services for which we don't want to wipe the error details. However in some cases our public service simply redirects to our internal service and then we have to ensure we wipe the error before proxying the response on.
I though recover_error might do the trick but it appears to be an internal thing?