contentful_express_tutorial icon indicating copy to clipboard operation
contentful_express_tutorial copied to clipboard

I can't run the sample app as is, I keep getting this error

Open petergzli opened this issue 6 years ago • 4 comments

products.js - getProducts (line 17) error: {
  "sys": {
    "type": "Error",
    "id": "InvalidQuery"
  },
  "message": "The query you sent was invalid. Probably a filter or ordering specification is not applicable to the type of a field.",
  "details": {
    "errors": [
      {
        "name": "unknownContentType",
        "value": "DOESNOTEXIST"
      }
    ]
  },
  "requestId": "cec85c2a-3411-417e-b3a8-8a9c6811a33b"
}
Screen Shot 2019-11-05 at 12 03 51 PM

petergzli avatar Nov 05 '19 20:11 petergzli

Follow the instructions in the Readme about using your own content and it'll work

cachrisman avatar Nov 20 '19 11:11 cachrisman

or change the following files:

  • Change line 7 and line 14 of the services/products.js file replacing product with 2PqfXUJwE8qSYKuM0U6w8M
  • Change line 7 and line 14 of the services/categories.js file replacing category with 6XwpTaSiiI2Ak2Ww0oi6qa

and it'll work with the original demo data.

cachrisman avatar Nov 20 '19 11:11 cachrisman

The solution worked for me, thank you.

didadeda avatar Apr 21 '20 15:04 didadeda

@cachrisman I'm still getting this error in the latest version of the app. I'm using my own Space ID and production Access token. Any ideas?

sidedwards avatar Oct 05 '20 17:10 sidedwards