Skip to content

Datastore fetch needs to encapsulate all gRPC errors #2494

Description

@theacodes

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)
returnlist(query.fetch())
exceptgoogle.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])>

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.grpc

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions