Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Datastore fetch needs to encapsulate all gRPC errors #2494

Copy link
Copy link

Description

@theacodes
Issue body actions

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])>
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.grpc

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.