question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad request when attempting to query collection

See original GitHub issue

Hi, I don’t know what I’m doing wrong but when attempting to use this query:

const result = await req.env.cosmos.queryDocuments<Listing>({ collId: "listings", query: `SELECT * FROM c` });

I am getting this result:

{
        "response": {
            "webSocket": null,
            "url": "https://REDACTED.documents.azure.com/dbs/REDACTED/colls/listings/docs",
            "redirected": false,
            "ok": false,
            "headers": {},
            "statusText": "Bad Request",
            "status": 400,
            "bodyUsed": false,
            "body": {
                "locked": false
            }
        },
        "itemsProperty": "Documents"
    }

Note: I replaced sensitive info with REDACTED.

Is this a bug with this sdk or is there something I am doing wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Inrixiacommented, Nov 26, 2021

Working with changes in pull request

0reactions
jdanyowcommented, Nov 27, 2021

Closing this as duplicate of #123. Thanks for the PRs! Left some comments- need to figure out what subset of cross-partition queries it makes sense to support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >
Error 400: Bad Request when attempting to query the Azure ...
When using @azure/ms-rest-nodeauth and @azure/arm-resourcegraph, it seems that authentication using either interactiveLogin() or ...
Read more >
How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error caused by an invalid request. Thus, the server can't...
Read more >
400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
Read more >
WCF Data Service: Bad Request - Error in query syntax
I have WCF Data Service application. The back-end database is Ingress and it uses nHibernate. I am trying to fetch and update records...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found