diff --git a/src/redux/middleware/transitionMiddleware.js b/src/redux/middleware/transitionMiddleware.js index 5e886e768..6b25b0887 100644 --- a/src/redux/middleware/transitionMiddleware.js +++ b/src/redux/middleware/transitionMiddleware.js @@ -15,11 +15,21 @@ export default ({getState, dispatch}) => next => action => { const doTransition = () => { next(action); Promise.all(getDataDependencies(components, getState, dispatch, location, params, true)) - .then(resolve, resolve); + .then(resolve) + .catch(error => { + // TODO: You may want to handle errors for fetchDataDeferred here + console.warn('Warning: Error in fetchDataDeferred', error); + return resolve(); + }); }; Promise.all(getDataDependencies(components, getState, dispatch, location, params)) - .then(doTransition, doTransition); + .then(doTransition) + .catch(error => { + // TODO: You may want to handle errors for fetchData here + console.warn('Warning: Error in fetchData', error); + return doTransition(); + }); }); if (__SERVER__) {