diff --git a/frontend/src/js/dialog/wb-new-project-dialog.js b/frontend/src/js/dialog/wb-new-project-dialog.js
index 57a8c38..f5a897e 100644
--- a/frontend/src/js/dialog/wb-new-project-dialog.js
+++ b/frontend/src/js/dialog/wb-new-project-dialog.js
@@ -38,7 +38,7 @@ class WBNewProjectDialog extends Component {
makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/groups', { 'method': 'POST',
'data': JSON.stringify(group),
- 'expectedStatus': 202 }
+ 'expectedStatus': [200, 202] }
).then(callback);
} }>
diff --git a/frontend/src/js/misc/make-arvados-request.js b/frontend/src/js/misc/make-arvados-request.js
index 2cd82db..046ab68 100644
--- a/frontend/src/js/misc/make-arvados-request.js
+++ b/frontend/src/js/misc/make-arvados-request.js
@@ -38,10 +38,15 @@ function makeArvadosRequest(arvHost, arvToken, endpoint, params={}) {
xhr.onreadystatechange = () => {
if (xhr.readyState !== 4)
return;
- if (xhr.status !== expectedStatus)
- reject(xhr);
- else
+
+ if ((expectedStatus instanceof Array) &&
+ expectedStatus.indexOf(xhr.status) !== -1) {
accept(xhr);
+ } else if (expectedStatus === xhr.status) {
+ accept(xhr);
+ } else {
+ reject(xhr);
+ }
};
xhr.send(data);
});