Catch http error if server is not responding

This commit is contained in:
Gregory Eremin 2016-01-10 17:29:47 +03:00
parent a8cab895db
commit f0450ea703

View File

@ -39,5 +39,10 @@ function getURL(url, params, callback) {
}
}
};
xhr.send(null);
try {
xhr.send(null);
} catch (e) {
callback({error: e});
}
}