Merge pull request #2393 from benjiwheeler/update-project-error

project page will no longer vanish when project metadata update fails on the backend
This commit is contained in:
Benjamin Wheeler 2018-12-04 16:38:42 -05:00 committed by GitHub
commit 93b04a59f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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