diff --git a/backend/lib/NTPClient.js b/backend/lib/NTPClient.js index d631abb53c..b2211ff3d8 100644 --- a/backend/lib/NTPClient.js +++ b/backend/lib/NTPClient.js @@ -44,7 +44,7 @@ class NTPClient { this.state = new States.ValetudoNTPClientEnabledState({}); if (this.config.get("embedded") === true) { - this.pollTime().then(() => { + this.pollTime().catch(() => { /* intentional */ }); } @@ -84,7 +84,9 @@ class NTPClient { Logger.debug("Next NTP sync in " + ntpConfig.interval + " ms"); this.nextPollTimeout = setTimeout(() => { - this.pollTime(); + this.pollTime().catch(() => { + /* intentional */ + }); }, ntpConfig.interval); } catch (e) { let error = { @@ -126,7 +128,9 @@ class NTPClient { Logger.debug("Next NTP sync in " + FAILURE_RETRY_INTERVAL + " ms"); this.nextPollTimeout = setTimeout(() => { - this.pollTime(); + this.pollTime().catch(() => { + /* intentional */ + }); }, FAILURE_RETRY_INTERVAL); } } diff --git a/backend/lib/miio/Dummycloud.js b/backend/lib/miio/Dummycloud.js index c4ed083172..63ed6df4d8 100644 --- a/backend/lib/miio/Dummycloud.js +++ b/backend/lib/miio/Dummycloud.js @@ -58,6 +58,8 @@ class Dummycloud { "firsttest": 1193 } } + }).catch(e => { + Logger.warn(`Error while responding to ${msg.method}`, e); }); return; case "_async.stat": @@ -66,6 +68,8 @@ class Dummycloud { this.miioSocket.sendMessage({ "id": msg.id, "result": "ok" + }).catch(e => { + Logger.warn(`Error while responding to ${msg.method}`, e); }); return; } diff --git a/backend/lib/miio/MiioSocket.js b/backend/lib/miio/MiioSocket.js index 57458a9fcd..e034aa0e7a 100644 --- a/backend/lib/miio/MiioSocket.js +++ b/backend/lib/miio/MiioSocket.js @@ -226,11 +226,6 @@ class MiioSocket { }); } - /** Sends a ping / keepalive message. */ - sendPing() { - this.sendMessage(null); - } - /** * @param {(msg: import("./DecodedMiioPacket")) => void} fn */ diff --git a/backend/lib/mqtt/MqttController.js b/backend/lib/mqtt/MqttController.js index 1f598ce837..0f397b8dc7 100644 --- a/backend/lib/mqtt/MqttController.js +++ b/backend/lib/mqtt/MqttController.js @@ -363,6 +363,8 @@ class MqttController { this.robotHandle.refresh().catch(err => { Logger.error("Error during MQTT handle refresh", err); }); + }).catch(e => { + Logger.error("Error on MQTT reconfigure state change", e); }); }).catch(e => { Logger.error("Error on MQTT reconfigure", e); diff --git a/backend/lib/robots/MiioValetudoRobot.js b/backend/lib/robots/MiioValetudoRobot.js index 3e62a4b439..dc33e9d6a4 100644 --- a/backend/lib/robots/MiioValetudoRobot.js +++ b/backend/lib/robots/MiioValetudoRobot.js @@ -572,6 +572,8 @@ class MiioValetudoRobot extends ValetudoRobot { if (!parsedMap) { Logger.warn("Failed to parse uploaded map"); } + }).catch(e => { + Logger.warn("Failed to preprocess uploaded map"); }); } diff --git a/backend/lib/robots/roborock/RoborockValetudoRobot.js b/backend/lib/robots/roborock/RoborockValetudoRobot.js index 8cc870b903..87b879d9fb 100644 --- a/backend/lib/robots/roborock/RoborockValetudoRobot.js +++ b/backend/lib/robots/roborock/RoborockValetudoRobot.js @@ -112,6 +112,8 @@ class RoborockValetudoRobot extends MiioValetudoRobot { case "_sync.getctrycode": this.sendCloud({ id: msg.id, result: {ctry_code: "DE"} //TODO + }).catch(e => { + Logger.warn(`Error while responding to ${msg.method}`, e); }); return true; @@ -122,8 +124,11 @@ class RoborockValetudoRobot extends MiioValetudoRobot { code: -6, message: "not set app data" } + }).catch(e => { + Logger.warn(`Error while responding to ${msg.method}`, e); }); + return true; // Roborock does not use the common presigned URL implementation, it requires this specific format. case "_sync.gen_tmp_presigned_url": @@ -147,7 +152,10 @@ class RoborockValetudoRobot extends MiioValetudoRobot { } } - this.sendCloud({id: msg.id, result: mapUploadUrls}); + this.sendCloud({id: msg.id, result: mapUploadUrls}).catch(e => { + Logger.warn(`Error while responding to ${msg.method}`, e); + }); + return true; } diff --git a/frontend/src/map/Map.tsx b/frontend/src/map/Map.tsx index c6823b9fa2..240d9b1319 100644 --- a/frontend/src/map/Map.tsx +++ b/frontend/src/map/Map.tsx @@ -211,12 +211,16 @@ abstract class Map extends React.Component

{ this.updateDrawableComponents().then(() => { this.draw(); + }).catch(() => { + /* intentional */ }); } protected redrawLayers() : void { this.mapLayerManager.draw(this.props.rawMap, this.props.theme).then(() => { this.draw(); + }).catch(() => { + /* intentional */ }); }