Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

API crahes upon queries with empty parts #407

Open
hermannsblum opened this issue Nov 23, 2019 · 0 comments
Open

API crahes upon queries with empty parts #407

hermannsblum opened this issue Nov 23, 2019 · 0 comments

Comments

@hermannsblum
Copy link
Contributor

hermannsblum commented Nov 23, 2019

The API crahes in case that a where query contains an empty part, e.g. where={"$and":[{"$or":[]},{"group":"5ac933284db3bd0001e9f2a9"}]}. The same query succeeds if the part {"$or":[]} is removed.

Easier query to reproduce (no auth required):

https://api-dev.amiv.ethz.ch/events?where=%7B%22%24and%22%3A%5B%7B%22%24or%22%3A%5B%5D%7D%2C%7B%22_id%22%3A%225b042d6f872eae0001b459d6%22%7D%5D%7D

vs

https://api-dev.amiv.ethz.ch/events?where=%7B%22%24and%22%3A%5B%7B%22_id%22%3A%225b042d6f872eae0001b459d6%22%7D%5D%7D

The expected behaviour should be that the query returns a 4xx error code because it is ill defined.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant