corrected error messages that wrongly mentioned session

This commit is contained in:
Ben Wheeler 2019-12-05 22:59:13 -05:00
parent 628218571b
commit bbf211a106
2 changed files with 10 additions and 8 deletions

View file

@ -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));
});
});

View file

@ -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));