mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
Merge pull request #1122 from ticaki/main
1 Line warning for EHOSTUNREACH
This commit is contained in:
@@ -1557,7 +1557,9 @@ on({id: AliasPath + 'Config.rebootNSPanel.SET', change: "any"}, async function (
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
log(error, 'warn');
|
if (error.code === 'EHOSTUNREACH') {
|
||||||
|
log(`Can't connect to display!`, 'warn')
|
||||||
|
} else log(error, 'warn');
|
||||||
})
|
})
|
||||||
.finally(function () {
|
.finally(function () {
|
||||||
if (Debug) {
|
if (Debug) {
|
||||||
@@ -1727,7 +1729,9 @@ on({id: [String(NSPanel_Path) + 'Relay.1',String(NSPanel_Path) + 'Relay.2'], cha
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
log(error, 'warn');
|
if (error.code === 'EHOSTUNREACH') {
|
||||||
|
log(`Can't connect to display!`, 'warn')
|
||||||
|
} else log(error, 'warn');
|
||||||
})
|
})
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -2124,7 +2128,9 @@ async function InitPopupNotify() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
log(error, 'warn');
|
if (error.code === 'EHOSTUNREACH') {
|
||||||
|
log(`Can't connect to display!`, 'warn')
|
||||||
|
} else log(error, 'warn');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (Debug){
|
if (Debug){
|
||||||
@@ -2591,7 +2597,9 @@ function get_current_berry_driver_version() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
log(error, 'warn');
|
if (error.code === 'EHOSTUNREACH') {
|
||||||
|
log(`Can't connect to display!`, 'warn')
|
||||||
|
} else log(error, 'warn');
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -2681,7 +2689,9 @@ function get_tasmota_status0() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
log(error, 'warn');
|
if (error.code === 'EHOSTUNREACH') {
|
||||||
|
log(`Can't connect to display!`, 'warn')
|
||||||
|
} else log(error, 'error');
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user