Skip to content

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

Description

@OverclockedTim

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.

Activity

  1. stephenplusplus commented on Dec 18, 2015

    @stephenplusplus
    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.
  2. stephenplusplus commented on Jan 4, 2016

    @stephenplusplus
    Contributor

    @callmehiphop is this a weird or good plan?

  3. callmehiphop commented on Jan 4, 2016

    @callmehiphop
    Contributor

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

  4. added a commit that references this issue on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.core

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions