mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-23 19:30:34 -04:00
handle update project metadata errors without setting body
This commit is contained in:
parent
ef64ccb343
commit
dab1be812e
1 changed files with 2 additions and 2 deletions
|
@ -754,9 +754,9 @@ module.exports.updateProject = (id, jsonData, username, token) => (dispatch => {
|
|||
dispatch(module.exports.setError('No project info'));
|
||||
return;
|
||||
}
|
||||
if (res.statusCode === 500) { // InternalServer
|
||||
if (res.statusCode >= 400) { // API responding with error
|
||||
dispatch(module.exports.setFetchStatus('project', module.exports.Status.ERROR));
|
||||
dispatch(module.exports.setError('API Internal Server Error'));
|
||||
dispatch(module.exports.setError('API Error Response'));
|
||||
return;
|
||||
}
|
||||
dispatch(module.exports.setFetchStatus('project', module.exports.Status.FETCHED));
|
||||
|
|
Loading…
Add table
Reference in a new issue