Closed Frencil closed 6 years ago
The LD example is a very good one, because it revealed some subtle distinctions between errors and dependencies.
Addressed by https://github.com/abought/locuszoom/blob/619da458d2f4e663d1256515af7ea3b608d442f9/assets/js/app/Data.js#L639
Design solution record as follows:
If a data layer is requesting data from multiple sources and only one of those sources fails, try to find a way to still display what data was received.
A good example of where this would help: Positions data layer that pulls down positions from one source and LD from another. Since the LD data is only used to color positions, and the coloring function will return a default color if passed an undefined value, ideally it would be nice to still see the default-colored positions data if the LD source is not responding.
In practice this may be very difficult to pull off since the data layer makes one request and
LocusZoom.Data
does the logic to generate actual requests to each source necessary given the fields requested. Right now it's an all-or-none type thing, where either all data is returned or an error is passed through. To return partial data means potentially returning both data and errors in some cases, which does not have clearly defined behavior.