Skip to content
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

Cloud Datastore 'Index Not Found' error somewhat obscure #1030

Closed
OverclockedTim opened this issue Dec 18, 2015 · 3 comments
Closed

Cloud Datastore 'Index Not Found' error somewhat obscure #1030

OverclockedTim opened this issue Dec 18, 2015 · 3 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. core

Comments

@OverclockedTim
Copy link

Using the gcloud-node library to do a query that cannot be fulfilled due to lack of indexing produces the obscure error 412, Precondition Failed error:

{ "code":412,"message":"Precondition Failed",...}

A FAQ or troubleshooting doc would be helpful, as would simply including a bit more information in the error itself. Something along the lines of "Precondition Failed: The request index required for this query is not found. To enable this query, please add it by <instructions/url-to-instructions/etc>

The Java Appengine version of this error message is extremely helpful and includes both the root cause of the error and instructions on how to create an appropriate index.

@stephenplusplus
Copy link
Contributor

Thanks for the feedback! I just recently had the same thought: #1016 (comment)

When we return an error, if the response body is a string, we can append that to the error message that we return.

Before:

console.log(error);
// Precondition Failed

After:

console.log(error);
// Precondition Failed - no matching index found.

@stephenplusplus stephenplusplus added enhancement api: datastore Issues related to the Datastore API. core labels Dec 18, 2015
@stephenplusplus
Copy link
Contributor

@callmehiphop is this a weird or good plan?

@callmehiphop
Copy link
Contributor

It sounds like a good plan to me, what reasoning would make it weird?

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. core
Projects
None yet
Development

No branches or pull requests

3 participants