Unverified Commit 27974056 authored by Benjamin Wheeler's avatar Benjamin Wheeler Committed by GitHub

Merge pull request #3590 from benjiwheeler/session-error-string-fix

corrected error messages that wrongly mentioned session
parents e0c562bf bbf211a1
......@@ -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));
});
});
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment