Map and EDA - filtering out all data is giving 500s for `map-markers` (again?)
bobular opened this issue · 2 comments
bobular commented
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:
- qa.vectorbase.org
- megastudy
- any marker mode
- any marker variable (it seems)
- either
- select an "empty" region of the timeslider, or
- make a "proper" filter in the collection start date variable, selecting an empty region (or use "relative humidity" variable and filter 300 to 600)
bobular commented
dmgaldi commented
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
- return a 204 to be handled by data service or
- return an empty response with just headers, which is already handled by data serivce
The latter option is probably slightly easier, but it would make the APIs a little inconsistent.