Skip to content

Map gRPC errors in datastore run_query onto 'google.cloud.exceptions'. - #2496

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-2494
Oct 4, 2016
Merged

Map gRPC errors in datastore run_query onto 'google.cloud.exceptions'.#2496
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-2494

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

Fixes#2494.

@dhermesdhermes added api: datastore Issues related to the Datastore API. grpc labels Oct 4, 2016
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 4, 2016
@dhermes

Copy link
Copy Markdown
ContributorAuthor

It may be worth putting a try/except around every method and using the mapping provided in code.proto

@theacodes

Copy link
Copy Markdown
Contributor

It may be worth putting a try/except around every method and using the mapping provided in code.proto

Yeah, this LGTM to me as a temporary fix, but I feel it'd be more thorough to do that.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Filed #2497


exc_state = _RPCState((), None, None, StatusCode.CANCELLED, None)
exc = GrpcRendezvous(exc_state, None, None, None)
self._run_query_failure_helper(exc, GrpcRendezvous)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
dhermes merged commit 2acda27 into googleapis:masterOct 4, 2016
@dhermes
dhermes deleted the fix-2494 branch October 4, 2016 20:53
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Sorry merged based on @jonparrott LGTM. Happy to revert / quick fix if you have concerns

@tseaver

Copy link
Copy Markdown
Contributor

No worries.

@dhermesdhermes mentioned this pull request Oct 12, 2016
@tseavertseaver changed the title Catching gRPC error in datastore run_query and converting to our error.Map gRPC errors in datastore run_query onto 'google.cloud.exceptions'.Oct 12, 2016
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Catching gRPC error in datastore run_query and converting to our error.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Catching gRPC error in datastore run_query and converting to our error.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastoreIssues related to the Datastore API.cla: yesThis human has signed the Contributor License Agreement.grpc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@dhermes@theacodes@tseaver@daspecster@googlebot