FgForrest/evitaDB

Exception when querying non-existent entity by unique attribute

Closed this issue · 1 comments

When we query entity by unique attribute like URL and this entity is not found. We get:

app//io.evitadb.api.exception.EntityCollectionRequiredException.<init>(EntityCollectionRequiredException.java:46)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.lambda$computeInternal$0(EntityFilteringFormula.java:89)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula$$Lambda$2115/0x0000000801594698.get(Unknown Source)
app//io.evitadb.utils.Assert.isTrue(Assert.java:135)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.computeInternal(EntityFilteringFormula.java:87)

Unfortunately, it was not possible to write a test for this case because it required special composition of the query, data and also enabled observability facilities.