Print errors in console

This commit is contained in:
Gabriel Augendre 2023-01-04 14:00:03 +01:00
parent 4a67492877
commit 4901eeb3e4

View file

@ -68,7 +68,8 @@ function handleStatus(data) {
statusTimeout = setTimeout(loadStatus, GLOBAL_TIMEOUT); statusTimeout = setTimeout(loadStatus, GLOBAL_TIMEOUT);
} }
function handleError() { function handleError(error) {
console.error(error);
clearTimeout(statusTimeout); clearTimeout(statusTimeout);
console.log("Lost connection :'("); console.log("Lost connection :'(");
document.body.classList.add("w3-disabled"); document.body.classList.add("w3-disabled");