What I meant to convey was that from the client perspective, we already treat any code that is not known by the client as unknown. It seems that is intended behavior. I brought that up to show that if we had a class per code, the client behavior of falling back to "UnknownGrpcError" class is already established.
Yes - if you had a few codes you want to handle the same way you could either specify the ones you care about or catch the base exception class and treat it as we currently do. The way to handle it now would be I think.
```
catch RpcError:
if we care about code handle
else raise
```
When I say it's opaque I mean that it could represent almost anything that went wrong with gRPC, and that it is has no defined behavior. I think this gets to your mention of how rather then having an inheritance chain for the behavior, the actual behavior is from an adjacent class from multiple inheritance. I do understand how treating a subclass as a base class is common and often preferred, but I'd argue that this multiple inheritance setup is different.
This gets into where it's strictly my opinion that it would be more clear if the behavior that I see most people expect on RpcError was part of its defined behavior. I understand that right now the docs make this guarantee, but from a perspective of statically typing this code it would be easier to make it clear that RpcError has methods I can call. I'd prefer not to rely on messages in the docs which can fall out of date. Otherwise I think code that is like:
```
try:
make grpc call
except RpcError as e:
switch on e.code
```
which I see recommended as how to handle gRPC errros, should be written as below to be more defensive as:
```
try:
make grpc call
except RpcError as e:
if instanceof(e, Call):
switch on e.code
```
If the convenience of this is not worth the cost of committing to these concrete classes I understand, but in my opinion having an exception chain that inherits from a base class like `RpcCallError(RpcError,Call` makes sense for python and doesn't make the API surface more fragile.
Thanks,