Properly call error event and reject promises when failing to load data sources.
prefer when over .then
Merge pull request #980 from AnalyticalGraphicsInc/fixDataSourceErrors

Properly call error event and reject promises when data sources fail to load.