mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
corrected error messages that wrongly mentioned session
This commit is contained in:
parent
628218571b
commit
bbf211a106
2 changed files with 10 additions and 8 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue