message=gettext('This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.');// eslint-disable-line max-len
if(ajaxSettings.notifyOnError===false){
return;
}
if(jqXHR.responseText){
try{
message=JSON.parse(jqXHR.responseText).error;
}catch(error){
message=str.truncate(jqXHR.responseText,300);
}
}else{
message=gettext('This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.');// eslint-disable-line max-len