From bbf211a10655a6e07c9252c541c3995662cda4d7 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 5 Dec 2019 22:59:13 -0500 Subject: [PATCH] corrected error messages that wrongly mentioned session --- src/redux/messages.js | 8 +++++--- src/redux/splash.js | 10 +++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/redux/messages.js b/src/redux/messages.js index 7cc7e4238..f3c8f7b4b 100644 --- a/src/redux/messages.js +++ b/src/redux/messages.js @@ -211,7 +211,7 @@ module.exports.getMessages = (username, token, opts) => { } if (typeof body === 'undefined') { dispatch(module.exports.setStatus('MESSAGE_STATUS', module.exports.Status.MESSAGES_ERROR)); - dispatch(module.exports.setMessagesError('No session content')); + dispatch(module.exports.setMessagesError('getMessages: response had no content')); return; } dispatch(module.exports.setStatus('MESSAGE_STATUS', module.exports.Status.FETCHED)); @@ -244,7 +244,7 @@ module.exports.getAdminMessages = (username, token) => (dispatch => { } if (typeof body === 'undefined') { dispatch(module.exports.setStatus('ADMIN_STATUS', module.exports.Status.ADMIN_ERROR)); - dispatch(module.exports.setMessagesError('No session content')); + dispatch(module.exports.setMessagesError('getAdminMessages: response had no content')); dispatch(module.exports.setAdminMessages([])); return; } @@ -270,7 +270,9 @@ module.exports.getScratcherInvite = (username, token) => (dispatch => { dispatch(module.exports.setScratcherInvite({})); return; } - if (typeof body === 'undefined') return dispatch(module.exports.setMessagesError('No session content')); + if (typeof body === 'undefined') { + return dispatch(module.exports.setMessagesError('getScratcherInvite: response had no content')); + } dispatch(module.exports.setScratcherInvite(body)); }); }); diff --git a/src/redux/splash.js b/src/redux/splash.js index e617dfe8c..b30ae1837 100644 --- a/src/redux/splash.js +++ b/src/redux/splash.js @@ -85,7 +85,7 @@ module.exports.getActivity = (username, token) => (dispatch => { } if (typeof body === 'undefined' || res.statusCode !== 200) { dispatch(module.exports.setFetchStatus('activity', module.exports.Status.ERROR)); - dispatch(module.exports.setError('No session content')); + dispatch(module.exports.setError('getActivity: request failed or response had no content')); return; } dispatch(module.exports.setFetchStatus('activity', module.exports.Status.FETCHED)); @@ -108,7 +108,7 @@ module.exports.getFeaturedGlobal = () => (dispatch => { } if (typeof body === 'undefined' || res.statusCode !== 200) { dispatch(module.exports.setFetchStatus('featured', module.exports.Status.ERROR)); - dispatch(module.exports.setError('No session content')); + dispatch(module.exports.setError('getFeaturedGlobal: request failed or response had no content')); return; } dispatch(module.exports.setFetchStatus('featured', module.exports.Status.FETCHED)); @@ -134,7 +134,7 @@ module.exports.getSharedByFollowing = (username, token) => (dispatch => { } if (typeof body === 'undefined' || res.statusCode !== 200) { dispatch(module.exports.setFetchStatus('shared', module.exports.Status.ERROR)); - dispatch(module.exports.setError('No session content')); + dispatch(module.exports.setError('getSharedByFollowing: request failed or response had no content')); return; } dispatch(module.exports.setFetchStatus('shared', module.exports.Status.FETCHED)); @@ -160,7 +160,7 @@ module.exports.getInStudiosFollowing = (username, token) => (dispatch => { } if (typeof body === 'undefined' || res.statusCode !== 200) { dispatch(module.exports.setFetchStatus('studios', module.exports.Status.ERROR)); - dispatch(module.exports.setError('No session content')); + dispatch(module.exports.setError('getInStudiosFollowing: request failed or response had no content')); return; } dispatch(module.exports.setFetchStatus('studios', module.exports.Status.FETCHED)); @@ -186,7 +186,7 @@ module.exports.getLovedByFollowing = (username, token) => (dispatch => { } if (typeof body === 'undefined' || res.statusCode !== 200) { dispatch(module.exports.setFetchStatus('loved', module.exports.Status.ERROR)); - dispatch(module.exports.setError('No session content')); + dispatch(module.exports.setError('getLovedByFollowing: request failed or response had no content')); return; } dispatch(module.exports.setFetchStatus('loved', module.exports.Status.FETCHED));