Skip to content

Fixes #937 - Adds HTTP method and URL to exceptions. - #938

Closed
jgeewax wants to merge 1 commit into
googleapis:masterfrom
jgeewax:937-more-helpful-errors
Closed

Fixes #937 - Adds HTTP method and URL to exceptions.#938
jgeewax wants to merge 1 commit into
googleapis:masterfrom
jgeewax:937-more-helpful-errors

Conversation

@jgeewax

Copy link
Copy Markdown
Contributor

Example:

Old: gcloud.exceptions.NotFound: 404 Resource not found (resource=new).

New: gcloud.exceptions.NotFound: 404 Resource not found (resource=new). (DELETE https://pubsub.googleapis.com/v1beta2/projects/jjg-cloud-research/topics/new)


Wasn't sure about a couple things, so wanted to ask...

  1. Name of the variable (request_string). Seems expressive, but would rather pass a request object or something similar. Should I rename? Or pass two (method and url) on to make_exception?
  2. Assembling the request string in the make_exception call (seemed like it might be better done on a separate line?)

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 23, 2015
Comment threadgcloud/connection.py

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

Let's not let this thing linger. Merge or close.

@tseavertseaver closed this Jul 3, 2015
parthea pushed a commit that referenced this pull request Sep 18, 2025
* chore(main): release 0.29.2
* Update CHANGELOG.md
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
* feat: support query profiling
* collection
* fix unit tests
* unit tests
* vector get and stream, unit tests
* aggregation get and stream, unit tests
* docstring
* query profile unit tests
* update base classes' method signature
* documentsnapshotlist unit tests
* func signatures
* undo client.py change
* transaction.get()
* lint
* system test
* fix shim test
* fix sys test
* fix sys test
* system test
* another system test
* skip system test in emulator
* stream generator unit tests
* coverage
* add system tests
* small fixes
* undo document change
* add system tests
* vector query system tests
* format
* fix system test
* comments
* add system tests
* improve stream generator
* type checking
* adding stars
* delete comment
* remove coverage requirements for type checking part
* add explain_options to StreamGenerator
* yield tuple instead
* raise exception when explain_metrics is absent
* refactor documentsnapshotlist into queryresultslist
* add comment
* improve type hint
* lint
* move QueryResultsList to stream_generator.py
* aggregation related type annotation
* transaction return type hint
* refactor QueryResultsList
* change stream generator to return ExplainMetrics instead of yield
* update aggregation query to use the new generator
* update query to use the new generator
* update vector query to use the new generator
* lint
* type annotations
* fix type annotation to be python 3.9 compatible
* fix type hint for python 3.8
* fix system test
* add test coverage
* use class method get_explain_metrics() instead of property explain_metrics
* address comments
* remove more Optional
* add type hint for async stream generator
* simplify yield in aggregation stream
* stream generator type annotation
* more type hints
* remove "Integer"
* docstring format
* mypy
* add more input verification for query_results.py
parthea pushed a commit that referenced this pull request Nov 26, 2025
parthea pushed a commit that referenced this pull request Mar 2, 2026
…uffixes (#938)
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 543503563
Source-Link: https://togithub.com/googleapis/googleapis/commit/212ecef96e3ea7c67465ff3f52680301ad0ea1f9
Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/532d27eea6ff128fdcbb3332176e894e76dcc685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTMyZDI3ZWVhNmZmMTI4ZmRjYmIzMzMyMTc2ZTg5NGU3NmRjYzY4NSJ9
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: corecla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jgeewax@dhermes@tseaver@googlebot