GeezerVison is showing github.com — datastore: unclear exception when query fails due to no index · Issue #2555 · googleapis/google-cloud-python
datastore: unclear exception when query fails due to no index #2555DescriptionWhen applying a specific combination of filters to a query, if an index is not set an unusual exception occurs. Example:
firstname = "foo"
last_checked = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(hours=1)
query = client.query(kind='people')
query.add_filter('first_name', '=', firstname)
query.add_filter('created_date', '>', last_checked)
results = list(query.fetch())
exception:
<class 'tuple'>: (<class 'grpc._channel._Rendezvous'>, <_Rendezvous of RPC that terminated with (StatusCode.INTERNAL, {"created":"@1476737648.089000000","description":"RST_STREAM","file":"src/core/ext/transport/chttp2/transport/frame_rst_stream.c","file_line":107,"http2_error":2})>, <traceback object at 0x000002325F840FC8>)
Please supply actionable text in the provided response Activitytseaver commented on Oct 17, 2016 @tinyhydra Thanks for the report. I'm not sure how to address it in google-cloud-python: ITSM that the back-end is not providing any information that would let us produce a better error message.
/cc @jonparrott Do you know who we should talk to on the back-end team? theacodes commented on Oct 17, 2016 dhermes commented on Oct 18, 2016 INTERNAL maps to a 500 error. @jonparrott and I had discussed having a generic catch-all to remap gRPC exceptions to our google.cloud.exceptions classes.
I'm not sure if a typical 500 error has more useful info? dhermes commented on Oct 18, 2016 See the mapping and previous discussion.
I got a little chuckle out of the description for INTERNAL:
Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors.
pcostell commented on Oct 18, 2016 Hey all --
This is likely due to gRPC issues that cannot translate newlines in exceptions (which were included in index precondition failures since we give you the actual error message).
These used to throw the correct status (PRECONDITION), but have since changed to be 500s.
We've fixed this to not use newlines for gRPC messages, @eddavisson can comment on the status of that change. pcostell commented on Oct 18, 2016 eddavisson commented on Oct 18, 2016 lukesneeringer commented on Aug 11, 2017 Hello,
One of the challenges of maintaining a large open source project is that sometimes, you can bite off more than you can chew. As the lead maintainer of google-cloud-python, I can definitely say that I have let the issues here pile up.
As part of trying to get things under control (as well as to empower us to provide better customer service in the future), I am declaring a "bankruptcy" of sorts on many of the old issues, especially those likely to have been addressed or made obsolete by more recent updates.
My goal is to close stale issues whose relevance or solution is no longer immediately evident, and which appear to be of lower importance. I believe in good faith that this is one of those issues, but I am scanning quickly and may occasionally be wrong. If this is an issue of high importance, please comment here and we will reconsider. If this is an issue whose solution is trivial, please consider providing a pull request.
Thank you!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|