Only mark group as failed to load for summary
Currently, any error in the `GroupStore`s several requests can cause the whole `GroupView` component to hide and be mark the group as failed to load. Since it is known that group members may fail to load in some cases, let's only show failed to load for the whole group when the summary fails. This also strengthens the `GroupView` test by ensuring we wait for multiple updates for checking results. Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
@@ -122,10 +122,6 @@ class GroupStore extends EventEmitter {
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
this.on('error', (err, groupId) => {
|
||||
console.error(`GroupStore encountered error whilst fetching data for ${groupId}`, err);
|
||||
});
|
||||
}
|
||||
|
||||
_fetchResource(stateKey, groupId) {
|
||||
@@ -148,7 +144,7 @@ class GroupStore extends EventEmitter {
|
||||
}
|
||||
|
||||
console.error(`Failed to get resource ${stateKey} for ${groupId}`, err);
|
||||
this.emit('error', err, groupId);
|
||||
this.emit('error', err, groupId, stateKey);
|
||||
}).finally(() => {
|
||||
// Indicate finished request, allow for future fetches
|
||||
delete this._fetchResourcePromise[stateKey][groupId];
|
||||
|
||||
Reference in New Issue
Block a user