Cloud Datastore 'Index Not Found' error somewhat obscure
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
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.
Thanks for the feedback! I just recently had the same thought: https://github.com/GoogleCloudPlatform/gcloud-node/issues/1016#issuecomment-164496987
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.
@callmehiphop is this a weird or good plan?
It sounds like a good plan to me, what reasoning would make it weird?