Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Azurite returns an error when `filter` is empty while querying table entities

Open craxal opened this issue 3 years ago • 3 comments

Which service(blob, file, queue, table) does this issue concern?

Table

Which version of the Azurite was used?

3.18.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What's the Node.js version?

16.14.2

What problem was encountered?

When an empty filter parameter is used to query entities, the following error is returned:

{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"The query condition specified in the request is invalid.\nRequestId:9c789a8e-5989-41c7-8180-b853dee771ec\nTime:2022-06-27T22:01:15.449Z"}}}

Azurite outputs this as well:

127.0.0.1 - - [27/Jun/2022:22:01:15 +0000] "GET /devstoreaccount1/test03()?$select=&$filter= HTTP/1.1" 400 -

Public Azure does not return an error when the filter is empty.

Steps to reproduce the issue?

  1. Install and launch Azurite from the command line.
  2. Install and launch Storage Explorer.
  3. In Storage Explorer, create an emulator table and open it.
  4. Open the Query Builder and remove the default clauses.
  5. Run the query.

Have you found a mitigation/solution?

No

craxal avatar Jun 27 '22 22:06 craxal

Hi @craxal thanks for raising this. It looks like an edge case, can you confirm? It will help us prioritize. Thanks!

edwin-huber avatar Jul 05 '22 17:07 edwin-huber

I would consider this an edge case, yes. Technically, it shouldn't be possible to have a no-clause query in Storage Explorer; we auto-generate a clause if that happens. That code wasn't working, which is how we found this bug.

craxal avatar Jul 06 '22 20:07 craxal