VEuPathDB / service-eda

Repo containing EDA web service
Apache License 2.0
0 stars 0 forks source link

Map and EDA - filtering out all data is giving 500s for `map-markers` (again?) #25

Closed bobular closed 4 months ago

bobular commented 4 months ago

It feels like we addressed this already and either returned a valid empty array response, a 500 with a specific message "did not contain any data" or a 204 response.

It seems for map-markers (all types including bubble) this 500 is back:

{"status":"server-error","message":"Unable to fetch all required data","requestId":"1IEiI3mZcWqR20aWqvuvVB"}

Here's how I reproduce it:

bobular commented 4 months ago

Same for EDA. This is GEMS1 filtered on an "empty" part of "water trips per day" to make a subset with zero of all entities. Then a histogram of age:

image

dmgaldi commented 4 months ago

Currently, we're not handling the EmptyResultException thrown by the StreamingDataClient in merging service here.

This can be fixed by splitting the buildAndProcessDataStreams method to build() and process() methods where the stream is built outside of the result consumer.

That way the exception can be handled here and we can either

The latter option is probably slightly easier, but it would make the APIs a little inconsistent.