Azurite
Azurite copied to clipboard
Azurite returns an error when `filter` is empty while querying table entities
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?
- Install and launch Azurite from the command line.
- Install and launch Storage Explorer.
- In Storage Explorer, create an emulator table and open it.
- Open the Query Builder and remove the default clauses.
- Run the query.
Have you found a mitigation/solution?
No
Hi @craxal thanks for raising this. It looks like an edge case, can you confirm? It will help us prioritize. Thanks!
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.