Open hardingt opened 7 years ago
I made a small change while debugging and you can see the return code is 404:
Using DHIS2_HOME environment variable pointing to: /Users/tharding/Documents/dish_files/playdev/dish.json
Data for org unit successfully deleted, id: undefined, name: Ngelehun CHC
{ type: 'buffer',
status: 404,
headers:
{ server: 'nginx/1.4.6 (Ubuntu)',
date: 'Thu, 26 Jan 2017 17:20:34 GMT',
Curious, I checked out the code checker in configManager.js:
cnf.is2xx = function(code) {
return parseInt(code/100);
}
which returns the 100s place it looks like, rather than if the number is between 200 and 299.
console.log(conf.is2xx(delOuResp.status));
4
Suggest we edit this function to return FALSE (or the JS equivalent) if not between 200 and 299
But visiting: https://play.dhis2.org/dev/api/26/organisationUnits/DiszpKrYNg8.json
Shows it still there.
Also note that rerunning it will give the exact same output.