[CB-2600] Fixing cordova.js to work when the XHR errors out.