Title: Attribute error thrown in gcloud/exceptions.py · Issue #653 · googleapis/google-cloud-python · GitHub
Open Graph Title: Attribute error thrown in gcloud/exceptions.py · Issue #653 · googleapis/google-cloud-python
X Title: Attribute error thrown in gcloud/exceptions.py · Issue #653 · googleapis/google-cloud-python
Description: If I use an incorrect dataset_id I get an AttributeError when I try to make an API call, because payload in the exception is set to b'Backend Error'. gcloud/exceptions.py in make_exception(response, content, use_json) 186 --> 187 message...
Open Graph Description: If I use an incorrect dataset_id I get an AttributeError when I try to make an API call, because payload in the exception is set to b'Backend Error'. gcloud/exceptions.py in make_exception(response...
X Description: If I use an incorrect dataset_id I get an AttributeError when I try to make an API call, because payload in the exception is set to b'Backend Error'. gcloud/exceptions.py in make_exception(...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/653
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Attribute error thrown in gcloud/exceptions.py","articleBody":"If I use an incorrect `dataset_id` I get an `AttributeError` when I try to make an API call, because `payload` in the exception is set to `b'Backend Error'`.\n\n\u003e gcloud/exceptions.py in make_exception(response, content, use_json)\n\u003e 186\n\u003e --\u003e 187 message = payload.get('message', message)\n\u003e 188 errors = payload.get('error', {}).get('errors', ())\n\u003e 189\n\u003e \n\u003e AttributeError: 'bytes' object has no attribute 'get'\n\nThis is with `gcloud==0.4.1` on Python 3.4.2.\n\nCode to reproduce:\n\n```\nfrom gcloud import datastore\ndatastore.set_defaults(dataset_id=123456789)\nquery = datastore.Query(kind=\"SomeKind\")\nlist(query.fetch())\n```\n\nExpected behaviour would be for a helpfully worded exception to be thrown.\n","author":{"url":"https://github.com/craigloftus","@type":"Person","name":"craigloftus"},"datePublished":"2015-02-16T16:39:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/653/google-cloud-python/issues/653"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1e7a15f2-8340-4509-7c43-c067199049c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7C4:110179:38B9D0:4CE246:6A4D3829 |
| html-safe-nonce | de4a8f0aa4db712db4adab77bf8ce137c20c2eff5dc758d439e227e2dd1d08a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0M0OjExMDE3OTozOEI5RDA6NENFMjQ2OjZBNEQzODI5IiwidmlzaXRvcl9pZCI6IjM2MDE2NjQyMDIxNjUyNzA1NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c449d428efa823d89a00eceacf7eab77ba7823bc155d7eef36164daf010d1c72 |
| hovercard-subject-tag | issue:57826025 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/653/issue_layout |
| twitter:image | https://opengraph.githubassets.com/757a9927b0e0392bed1daa8549f474fb80157f445207fa65eb9d5644c48064ae/googleapis/google-cloud-python/issues/653 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/757a9927b0e0392bed1daa8549f474fb80157f445207fa65eb9d5644c48064ae/googleapis/google-cloud-python/issues/653 |
| og:image:alt | If I use an incorrect dataset_id I get an AttributeError when I try to make an API call, because payload in the exception is set to b'Backend Error'. gcloud/exceptions.py in make_exception(response... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | craigloftus |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width