report loadUnpublishedEntries errors
This commit is contained in:
@ -243,10 +243,17 @@ export function loadUnpublishedEntries(collections) {
|
|||||||
if (state.config.get('publish_mode') !== EDITORIAL_WORKFLOW) return;
|
if (state.config.get('publish_mode') !== EDITORIAL_WORKFLOW) return;
|
||||||
const backend = currentBackend(state.config);
|
const backend = currentBackend(state.config);
|
||||||
dispatch(unpublishedEntriesLoading());
|
dispatch(unpublishedEntriesLoading());
|
||||||
backend.unpublishedEntries(collections).then(
|
backend.unpublishedEntries(collections)
|
||||||
response => dispatch(unpublishedEntriesLoaded(response.entries, response.pagination)),
|
.then(response => dispatch(unpublishedEntriesLoaded(response.entries, response.pagination)))
|
||||||
error => dispatch(unpublishedEntriesFailed(error))
|
.catch(error => {
|
||||||
);
|
dispatch(notifSend({
|
||||||
|
message: `Error loading entries: ${ error }`,
|
||||||
|
kind: 'danger',
|
||||||
|
dismissAfter: 8000,
|
||||||
|
}));
|
||||||
|
dispatch(unpublishedEntriesFailed(error));
|
||||||
|
Promise.reject(error)
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user