Skip to content

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Oct 22, 2016

Fixes #2497.

(Relevant to #2583 as well.)

FYI @jonparrott

@dhermes dhermes added api: datastore Issues related to the Datastore API. grpc labels Oct 22, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 22, 2016
@@ -220,6 +237,44 @@ def allocate_ids(self, project, request_pb):
_datastore_pb2.AllocateIdsResponse)


def _grpc_catch_rendezvous(to_call, *args, **kwargs):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2016

@jonparrott @daspecster PTAL

@daspecster
Copy link
Contributor

I like this better IMHO.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2016

FYI I am toying with Circle CI. Looks like Travis is being helpful for the time being though

@dhermes dhermes merged commit f327be3 into googleapis:master Oct 24, 2016
@dhermes dhermes deleted the fix-2497 branch October 24, 2016 16:54
@tseaver
Copy link
Contributor

tseaver commented Oct 24, 2016

Sorry to be late to the party. Wouldn't the _GRPC_ERROR_MAPPING and _grpc_catch_rendezvous bits logically live in cloud/google/cloud/exceptions.py? I presume we might want to use them in other APIs.

@dhermes
Copy link
Contributor Author

dhermes commented Oct 24, 2016

@tseaver I intentionally didn't do that, mindful of two things:

  • it may be premature to lift into core (i.e. YAGNI, but not quite YAGNI, more like YAGNI-yet)
  • changes in core have different implications release-wise than in the service packages

dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Oct 25, 2016
@tseaver
Copy link
Contributor

tseaver commented Oct 25, 2016

@dhermes FWIW, anywhere we are currently sniffing at StatusCode STM to be a candidate:

core/google/cloud/_testing.py
core/google/cloud/streaming/exceptions.py
core/google/cloud/streaming/http_wrapper.py
core/unit_tests/streaming/test_http_wrapper.py
datastore/google/cloud/datastore/_generated/datastore_grpc_pb2.py
datastore/google/cloud/datastore/connection.py
datastore/unit_tests/test_connection.py
docs/error-reporting-usage.rst
error_reporting/google/cloud/error_reporting/client.py
error_reporting/unit_tests/test_client.py
logging/google/cloud/logging/_gax.py
pubsub/google/cloud/pubsub/_gax.py

@dhermes
Copy link
Contributor Author

dhermes commented Oct 25, 2016

OK.

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Remapping (almost) all RPC status codes to our exceptions in datastore.
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
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