diff --git a/frontend/src/js/dialog/wb-new-project-dialog.js b/frontend/src/js/dialog/wb-new-project-dialog.js
index ed5dd16..db46614 100644
--- a/frontend/src/js/dialog/wb-new-project-dialog.js
+++ b/frontend/src/js/dialog/wb-new-project-dialog.js
@@ -36,9 +36,9 @@ class WBNewProjectDialog extends Component {
'owner_uuid': ownerUuid
};
makeArvadosRequest(arvHost, arvToken,
- '/arvados/v1/groups', { 'method': 'POST',
+ '/arvados/v1/groups?async=true', { 'method': 'POST',
'data': JSON.stringify(group),
- 'promiseOrdering': false }
+ 'expectedStatus': 202 }
).then(callback);
} }>
diff --git a/frontend/src/js/misc/make-arvados-request.js b/frontend/src/js/misc/make-arvados-request.js
index 972f2c3..2cd82db 100644
--- a/frontend/src/js/misc/make-arvados-request.js
+++ b/frontend/src/js/misc/make-arvados-request.js
@@ -11,13 +11,15 @@ function makeArvadosRequest(arvHost, arvToken, endpoint, params={}) {
'useSsl': true,
'requireToken': true,
'onProgress': () => {},
- 'promiseOrdering': true
+ 'promiseOrdering': true,
+ 'expectedStatus': 200
};
Object.keys(defaultParams).map(k => (params[k] =
(k in params ? params[k] : defaultParams[k])));
let { method, data, contentType, responseType,
- useSsl, requireToken, onProgress, promiseOrdering } = params;
+ useSsl, requireToken, onProgress, promiseOrdering,
+ expectedStatus } = params;
if (!(arvHost && (arvToken || !requireToken)))
return new Promise((accept, reject) => reject());
@@ -36,7 +38,7 @@ function makeArvadosRequest(arvHost, arvToken, endpoint, params={}) {
xhr.onreadystatechange = () => {
if (xhr.readyState !== 4)
return;
- if (xhr.status !== 200)
+ if (xhr.status !== expectedStatus)
reject(xhr);
else
accept(xhr);
diff --git a/frontend/src/js/misc/wb-delete-object.js b/frontend/src/js/misc/wb-delete-object.js
index eb8e510..af2ac4e 100644
--- a/frontend/src/js/misc/wb-delete-object.js
+++ b/frontend/src/js/misc/wb-delete-object.js
@@ -5,7 +5,7 @@ function wbDeleteObject(arvHost, arvToken, uuid) {
const typeName = arvadosTypeName(uuid);
return makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/' + typeName + 's/' +
- uuid, { 'method': 'DELETE', 'promiseOrdering': false });
+ uuid, { 'method': 'DELETE' });
}
export default wbDeleteObject;