Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 4, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Oct 4, 2016

Fixes #2494.

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

dhermes commented Oct 4, 2016

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

@theacodes
Copy link
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
Contributor Author

dhermes commented Oct 4, 2016

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:master Oct 4, 2016
@dhermes dhermes deleted the fix-2494 branch October 4, 2016 20:53
@dhermes
Copy link
Contributor Author

dhermes commented Oct 4, 2016

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

@tseaver
Copy link
Contributor

tseaver commented Oct 4, 2016

No worries.

@tseaver tseaver 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement. grpc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants