Open bartosz-jarmuz opened 1 year ago
gRPC catches and handles the error. gRPC requires the request is ended with a specific trailing header with the status.
Why do you want to catch the exception message?
I had an error handling middleware with some logic (logging, mapping) and expected that the errors happening during gRPC calls also go through that.
Should investigate whether it is worth providing an option to gRPC server to rethrow exceptions.
Hello, I have trouble understanding the behavior of the GRPC interceptors. I thought it would act in a similar way as netcore middleware, i.e. that if I throw an exception in it, e.g. like that:
this exception would be caught by the middleware that is executed before the GRPC middleware, e.g.
however, instead the
await _next(context)
finishes without problems and the error is only caught by the grpc client side code.