Код: Выделить всё
try {
$.post('',{},function(res) {
}).fail(function (xhr, textStatus, errorThrown) {
xhr.textStatus = textStatus;
xhr.errorThrown = errorThrown;
console.log('fail',xhr);
// how to get the 'ERR_CONNECTION_REFUSED' or anything else as string?
});
} catch(e) {
console.log('catch',e);
}
- ERR_NAME_NOT_RESOLVED
- ERR_CONNECTION_REFUSED
- ERR_BLOCKED_BY_CLIENT
- ERR_TUNNEL_CONNECTION_FAILED (при использовании прокси)
Подробнее здесь: https://stackoverflow.com/questions/285 ... on-refused
Мобильная версия