X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Faccounts%2Fsrc%2Faccount%2FaccountSource.js;h=45da0fb9af570dd17f8305ea7eeda2c9ab211b0e;hp=08fb9f386ce914319f811c91cc1d93d20e407d5b;hb=0fc4b246b69ecd59401aa6c9bf921b29793d8136;hpb=6f5b417dfbeddcd8d452dcf156f75c293f22b74c diff --git a/skyquake/plugins/accounts/src/account/accountSource.js b/skyquake/plugins/accounts/src/account/accountSource.js index 08fb9f386..45da0fb9a 100644 --- a/skyquake/plugins/accounts/src/account/accountSource.js +++ b/skyquake/plugins/accounts/src/account/accountSource.js @@ -38,7 +38,7 @@ module.exports = function(Alt) { return resolve(false); } $.ajax({ - url: '/socket-polling', + url: '/socket-polling?api_server=' + API_SERVER, type: 'POST', beforeSend: Utils.addAuthorizationStub, data: { @@ -50,6 +50,7 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + reject(xhr.responseText || 'An error occurred. Check your logs for more information'); });; }); }, @@ -133,7 +134,7 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); - reject(); + reject(xhr.responseText || 'An error occurred. Check your logs for more information'); }); }); @@ -177,7 +178,7 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); - reject('error'); + reject(xhr.responseText || 'An error occurred. Check your logs for more information'); }); }); @@ -204,7 +205,7 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); - reject('error'); + reject(xhr.responseText || 'An error occurred. Check your logs for more information'); }); }) },