ITADN

[FR] Use try/catch when a host ist not reachable to check for updates

#1373Openmmattel 创建于 2025-01-14
M
mmattelcommented
My Raspberry NW sometimes out of the blue prevents access to external hosts. When this happens, a check for node SW updates fails. This gets logged, see example below. My FR is, that the code uses a try/catch and the error message logged gets reduced to `Cannot check for firmware updates for node 20: connect EHOSTUNREACH 104.21.16.1:443 (ZW0261)`. The additional reference to the code is not of interrest. By this reduction, we also know that there is no code issue. ``` 2025-01-09 07:34:47.499 ERROR Z-WAVE-SERVER: Cannot check for firmware updates for node 20: connect EHOSTUNREACH 104.21.16.1:443 (ZW0261) ZWaveError: Cannot check for firmware updates for node 20: connect EHOSTUNREACH 104.21.16.1:443 (ZW0261) at ZWaveController2.getAvailableFirmwareUpdates (/usr/src/app/node_modules/zwave-js/src/lib/controller/Controller.ts:8239:10) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ControllerMessageHandler.handle (/usr/src/app/node_modules/@zwave-js/server/dist-esm/lib/controller/message_handler.js:224:30) at Client.receiveMessage (/usr/src/app/node_modules/@zwave-js/server/dist-esm/lib/server.js:133:62) Logging to file: /usr/src/app/store/logs/zwavejs_2025-01-10.log ```
0 条评论