GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore: When runQuery fails with index required, the exact index needed should be part of the error message. · Issue #1090 · googleapis/google-cloud-node

Datastore: When runQuery fails with index required, the exact index needed should be part of the error message. #1090

New issue
Copy link
New issue
Copy link
Closed
Closed
Datastore: When runQuery fails with index required, the exact index needed should be part of the error message.#1090
Copy link
Assignees
stephenplusplus
Labels
api: datastoreIssues related to the Datastore API.

Description

@krisnye
krisnye
opened on Jan 26, 2016
Issue body actions

This is the current error message when a required index is not found:

ApiError: Precondition Failed - no matching index found.

Many lives would be immeasurably improved if the error looked more like this:

ApiError: Precondition Failed - no matching index found.
    Solution: You must add the following index to your index.yaml file:
        - kind: Cat
          ancestor: no
          properties:
          - name: name
          - name: age
            direction: desc
    For more info, see: https://cloud.google.com/sdk/gcloud/reference/preview/datastore/create-indexes

Activity

  1. krisnye
    changed the title [-]Datastore.runQuery: When fails with index required, the exact index needed should be part of the error message.[/-] [+]Datastore: When runQuery fails with index required, the exact index needed should be part of the error message.[/+] on Jan 26, 2016
  2. krisnye commented on Jan 26, 2016

    @krisnye
    krisnye
    on Jan 26, 2016
    Author
    More actions

    For instance, this is the query I am currently trying to run:

    {
        "namespace":null,
        "kinds":["Task"],
        "filters":[
            {
                "name":"__key__",
                "op":"HAS_ANCESTOR",
                "val":{
                    "name":"9CDFB82D-FC98-2B7F-22C5-A391A0623474",
                    "kind":"Project",
                    "path":["Project","9CDFB82D-FC98-2B7F-22C5-A391A0623474"]
                }
            },
            {"name":"parentId =","op":"=","val":"9"}
        ],
        "orders":[{"name":"order","sign":"+"}],
        "groupByVal":[],
        "selectVal":[],
        "autoPaginateVal":true,
        "startVal":null,
        "endVal":null,
        "limitVal":-1,
        "offsetVal":-1
    }
    

    I get the Error that no matching index is found.
    My application has the following index specified:

    Task
    Includes ancestors parentId ▲ + order ▲

    This leaves me unsure of what the problem is, or what index I need to add.

  3. stephenplusplus commented on Jan 27, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 27, 2016
    Contributor
    More actions

    @pcostell - is it possible/reliable to generate such an error message given the query object and 412 response?

  4. stephenplusplus
    added
    enhancement
    api: datastoreIssues related to the Datastore API.
    on Jan 27, 2016
  5. pcostell commented on Jan 27, 2016

    @pcostell
    pcostell
    on Jan 27, 2016
    Contributor
    More actions

    Yup this has been a rough experience. We are working on adding this to the server error message, so as long as you pass along the error message this should start working soon.

  6. stephenplusplus commented on Jan 29, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 29, 2016
    Contributor
    More actions

    Cool, that will be a great addition! We pass the raw API message, so the user will get it when it's available.

  7. stephenplusplus
    closed this as completedon Jan 29, 2016
  8. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  9. miguelvelezsa
    added 2 commits that reference this issue on Jul 23, 2025

    feat: Add compute operation service protos (#1090)

    7c37d37

    chore: release 2.25.0 (#1098)

    512a9ef
  10. gcf-owl-bot
    added a commit that references this issue on Aug 29, 2025

    feat: Update Compute Engine v1beta API to revision 20250810 (#1090)

    bdf45fd
  11. sofisl
    added a commit that references this issue on Sep 2, 2025

    feat: [compute] Update Compute Engine v1beta API to revision 20250810 (…

    72c9729
  12. gcf-merge-on-green
    added a commit that references this issue on Sep 4, 2025

    chore: release main (#6639)

    8257640
  13. miguelvelezsa
    added a commit that references this issue on Jan 28, 2026

    feat: Support for using multiple databases in datastore (#1090)

    0842cd0
  14. sofisl
    added 2 commits that reference this issue on Feb 3, 2026

    chore: Enable Size-Label bot in all googleapis NodeJs repositories (#…

    f86d217

    feat: Support for using multiple databases in datastore (#1090)

    7c9fd49
  15. sofisl
    added a commit that references this issue on Feb 17, 2026

    feat: Support for using multiple databases in datastore (#1090)

    f96f1b4
  16. sofisl
    added a commit that references this issue on Feb 25, 2026

    feat(storage): Add versioning as optional metadata param of createBuc…

    a410040
  17. GautamSharda
    added a commit that references this issue on Mar 11, 2026

    fix(deps): update opentelemetry monorepo to ^0.10.0 (#1090)

    fac281e
  18. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    feat(storage): Add versioning as optional metadata param of createBuc…

    a94ee4d
  19. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    feat: Errors from gax layer (#1090)

    c2efc61

    feat: Errors from gax layer (#1090)

    7102726
  20. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    feat: Errors from gax layer (#1090)

    709617e
  21. thiyaguk09
    added a commit that references this issue on May 5, 2026

    feat: Errors from gax layer (googleapis#1090)

    dc319ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.