This code:
try:
start_date = datetime.datetime(1990, 1, 1)
query = client.query(kind='Task')
query.add_filter(
'created', '>', start_date)
query.add_filter(
'priority', '>', 3)
return list(query.fetch())
except google.cloud.exceptions.BadRequest:
pass
Raises a grpc._channel._Rendezvous exception instead of an expected subclass of google.cloud.exceptions.BadRequest (I'd also accept google.cloud.exceptions.GoogleCloudError):
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.INVALID_ARGUMENT, Cannot have inequality filters on multiple properties: [created, priority])>
This code:
Raises a
grpc._channel._Rendezvousexception instead of an expected subclass ofgoogle.cloud.exceptions.BadRequest(I'd also acceptgoogle.cloud.exceptions.GoogleCloudError):