Skip to content

Commit d5346c8

Browse files
author
Daisuke Baba
committed
Always output error log
1 parent 6c0c7b9 commit d5346c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/generic-ble.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ function onStateChangeFunc(RED) {
136136
function onErrorFunc(RED) {
137137
return (err) => {
138138
debug(`[GenericBLE:ERROR] ${err.message}, ${err.stack}`);
139+
RED.log.error(err);
139140
if (!noble.initialized) {
140141
RED.log.error(
141-
`BlueZ Permission Error. See 'Installation Note' in README at https://flows.nodered.org/node/node-red-contrib-generic-ble for addressing the issue.`
142+
`The error seems to be a BlueZ Permission Error. See 'Installation Note' in README at https://flows.nodered.org/node/node-red-contrib-generic-ble for addressing the issue.`
142143
);
143-
} else {
144-
RED.log.error(err);
145144
}
146145
Object.values(configBleDevices).forEach((node) => node.emit('error'));
147146
};

0 commit comments

Comments
 (0)