X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Faccounts%2Fsrc%2Faccount%2FaccountSource.js;h=8c1dd6d37f9ce0ed7013b73a4c361723c28a825d;hp=b17af40c28ab7b177699d63f9bed6ece995498c0;hb=80097691f3ed0adb4406906ef619c1042c2219ea;hpb=f38170cf9524bd2b0aeb3c6d64471c1b5878cbed diff --git a/skyquake/plugins/accounts/src/account/accountSource.js b/skyquake/plugins/accounts/src/account/accountSource.js index b17af40c2..8c1dd6d37 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?api_server=' + API_SERVER , + url: '/socket-polling', 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'); }); }) },