However the user never sees the exception, because the sending task is started as fire and forget, without handling the exception case. This will result in hidden exceptions. The user only notices that the program doesn't work as expected or it feels like the program has hung up:
Hey there,
I've incorrectly passed a string instead of a message to a grpc field. This will result in an exception which is thrown during encoding in the
__bytes__
method (https://github.com/danielgtaylor/python-betterproto/blob/master/src/betterproto/__init__.py#L634). This method throws an exception that it cannot encode a string as a message.However the user never sees the exception, because the sending task is started as fire and forget, without handling the exception case. This will result in hidden exceptions. The user only notices that the program doesn't work as expected or it feels like the program has hung up:
https://github.com/danielgtaylor/python-betterproto/blob/master/src/betterproto/grpc/grpclib_client.py#L153