Make it possible to provide an error handler so that I can report errors to arbitrary observability SaaS's
Describe the bug
In lib/grpc/server.ex in function do_handle_request if the message fails to decode here codec.decode(message, req_mod) an exception is thrown but there is no way to capture the error besides seeing it in my server logs.
The error is logged via Logger but by that point I no longer had the original error (just a message and a stack trace as text). This is preventing a straightforward integration with my observabilty SaaS who's API requires real error objects.
To Reproduce Steps to reproduce the behavior:
Send a message with the wrong wire type for a field (imagine you've made a backwards incompatible change to your protobuf message).
Expected behavior
I expect to be able to capture arbitrary errors generated by grpc and handle them as I wish.
Here's a PR that implements an "exception sink" configuration option for endpoints.
https://github.com/elixir-grpc/grpc/pull/197
Perhaps this is also related to #229 I guess if you just want to report errors, we should be able to provide sufficient Telemetry events for that