IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Bläddra i källkod

For some reason 200 seems to be a valid result for object creation as well as 202.

master
förälder
incheckning
d5e76ff524
2 ändrade filer med 9 tillägg och 4 borttagningar
  1. +1
    -1
      frontend/src/js/dialog/wb-new-project-dialog.js
  2. +8
    -3
      frontend/src/js/misc/make-arvados-request.js

+ 1
- 1
frontend/src/js/dialog/wb-new-project-dialog.js Visa fil

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


+ 8
- 3
frontend/src/js/misc/make-arvados-request.js Visa fil

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


Laddar…
Avbryt
Spara