Commit 3af30d82 authored by Adrien Dorsaz's avatar Adrien Dorsaz

panel: handle error message

parent 876c716c
......@@ -70,14 +70,14 @@ function checkConnection() {
}, clientConnected);
}
function refreshNetwork(network) {
if (network) {
function refreshNetwork(response) {
if (!response.error) {
let xmppNet = document.getElementById('xmppNet');
xmppNet.innerHTML = network.toString();
xmppNet.innerHTML = response.toString();
}
else {
panel['error'].style.display = 'block';
panel['error'].innerHTML = 'No response received !';
panel['error'].innerHTML = response.error.message + '(' + response.error.code + ')';
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment