From a2dc53902284a6fa8ecbf1bb3f81f27af4c08242 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Tue, 17 Oct 2017 19:39:50 +0300 Subject: [PATCH] InboxPage uses storableError func and correct proptype validation. --- src/containers/InboxPage/InboxPage.duck.js | 3 ++- src/containers/InboxPage/InboxPage.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/containers/InboxPage/InboxPage.duck.js b/src/containers/InboxPage/InboxPage.duck.js index 73ef5777..1c9a8f08 100644 --- a/src/containers/InboxPage/InboxPage.duck.js +++ b/src/containers/InboxPage/InboxPage.duck.js @@ -1,4 +1,5 @@ import { reverse, sortBy } from 'lodash'; +import { storableError } from '../../util/errors'; import { parse } from '../../util/urlHelpers'; import { addMarketplaceEntities } from '../../ducks/marketplaceData.duck'; @@ -102,7 +103,7 @@ export const loadData = (params, search) => (dispatch, getState, sdk) => { return response; }) .catch(e => { - dispatch(fetchOrdersOrSalesError(e)); + dispatch(fetchOrdersOrSalesError(storableError(e))); throw e; }); }; diff --git a/src/containers/InboxPage/InboxPage.js b/src/containers/InboxPage/InboxPage.js index 93da1416..5b7ad86c 100644 --- a/src/containers/InboxPage/InboxPage.js +++ b/src/containers/InboxPage/InboxPage.js @@ -23,7 +23,7 @@ import { TopbarContainer } from '../../containers'; import { loadData } from './InboxPage.duck'; import css from './InboxPage.css'; -const { arrayOf, bool, instanceOf, number, oneOf, shape, string } = PropTypes; +const { arrayOf, bool, number, oneOf, shape, string } = PropTypes; const formatDate = (intl, date) => { return { @@ -303,11 +303,11 @@ InboxPageComponent.propTypes = { tab: string.isRequired, }).isRequired, - authInfoError: instanceOf(Error), + authInfoError: propTypes.error, currentUser: propTypes.currentUser, fetchInProgress: bool.isRequired, - fetchOrdersOrSalesError: instanceOf(Error), - logoutError: instanceOf(Error), + fetchOrdersOrSalesError: propTypes.error, + logoutError: propTypes.error, pagination: propTypes.pagination, providerNotificationCount: number, scrollingDisabled: bool.isRequired,