I need to implement custom exceptions for handling gRPC request errors with Python. For HTTP requests it's straightforward - requests library catches it well when there's an error code etc. I am looking for analogous ways for gRPC to do something like:
try:
# send gRPC request
except SomeGRPCException as e:
# custom handle
Is there a way to handle gRPC errors like that in Python? Or with gRPC it wouldn't work like in the example?