Remapping (almost) all RPC status codes to our exceptions in datastore. by dhermes · Pull Request #2590 · googleapis/google-cloud-python · GitHub
Skip to content

Remapping (almost) all RPC status codes to our exceptions in datastore.#2590

Merged
dhermes merged 2 commits intogoogleapis:masterfrom
dhermes:fix-2497
Oct 24, 2016
Merged

Remapping (almost) all RPC status codes to our exceptions in datastore.#2590
dhermes merged 2 commits intogoogleapis:masterfrom
dhermes:fix-2497

Conversation

@dhermes
Copy link
Copy Markdown
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

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
Copy Markdown
Contributor Author

dhermes commented Oct 24, 2016

@jonparrott @daspecster PTAL

@daspecster
Copy link
Copy Markdown
Contributor

I like this better IMHO.

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

dhermes commented Oct 25, 2016

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
parthea pushed a commit that referenced this pull request Nov 24, 2025
Remapping (almost) all RPC status codes to our exceptions in datastore.
parthea pushed a commit that referenced this pull request Nov 24, 2025
ohmayr pushed a commit that referenced this pull request Mar 26, 2026
Co-authored-by: Kevin Zheng <147537668+gkevinzheng@users.noreply.github.com>
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