New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datastore Count panics with unhelpful message if query contains invalid type #1306
Labels
api: datastore
Issues related to the Datastore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
Could you paste the error that you're seeing? |
jeanbza
added
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
api: datastore
Issues related to the Datastore API.
needs more info
This issue needs more information from the customer to proceed.
labels
Feb 6, 2019
Absolutely
|
jeanbza
removed
the
needs more info
This issue needs more information from the customer to proceed.
label
Feb 6, 2019
After looking into this, I would say the problem is that Instead of adding some code to protect against this in |
jeanbza
added
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
priority: p2
Moderately-important priority. Fix may not be included in next release.
and removed
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
labels
Feb 8, 2019
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.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
Datastore
Describe Your Environment
Alpine Docker on Linux
Expected Behavior
When
Count
is run with a query containing an invalid type, an error is returned indicating a bad type in the query. For example, given the following:err
should be similar todatastore: bad query filter value type: invalid Value type MyType
so that the filter value can correctly be cast to anint
.This should be trivially accomplished by adding a check for an error on the iterator in
Count
.Actual Behavior
The program crashes when
it.nextBatch()
is called inCount
ast.req.GetQuery()
returnsnil
.The text was updated successfully, but these errors were encountered: