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=b17af40c28ab7b177699d63f9bed6ece995498c0;hb=31ca8b157982cae1624667c8d7011c06d3207a7b;hpb=a6690e0878612ca0ffb7119c95a033dd1d7d1246 diff --git a/skyquake/plugins/accounts/src/account/accountSource.js b/skyquake/plugins/accounts/src/account/accountSource.js index b17af40c2..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?api_server=' + API_SERVER , + 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'); }); }) },