-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug and device fix #2357
Bug and device fix #2357
Conversation
Test: convertGet Changes ?
change log message
bugfix
replaced error reporting via JSON.stringify(error) to specific messaging via error.message and error.stack
Added try/catch to a number of internal functions when calling zigbee-herdsman or zigbee-herdsman-converters functions
updated logging
Fix Ikea Parasoll battery (can be queried again) Possibly fix random crashes due to unhandled promise rejection
@@ -85,7 +85,7 @@ | |||
} | |||
|
|||
} catch (error) { | |||
if (error) this.error(`getGroupMembersFromController: error is ${JSON.stringify(error)} ${JSON.stringify(new Error().stack)}`); | |||
if (error) this.error(`getGroupMembersFromController: error is ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
@@ -85,7 +85,7 @@ | |||
} | |||
|
|||
} catch (error) { | |||
if (error) this.error(`getGroupMembersFromController: error is ${JSON.stringify(error)} ${JSON.stringify(new Error().stack)}`); | |||
if (error) this.error(`getGroupMembersFromController: error is ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
this.error(`error saving device names: ${JSON.stringify(err)}`); | ||
fs.writeFile(this.dev_names_fn, JSON.stringify(savedDeviceNamesDB, null, 2), error => { | ||
if (error) { | ||
this.error(`error saving device names: ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
@@ -369,7 +379,7 @@ | |||
} catch (error) { | |||
this.sendError(error); | |||
if (error) { | |||
this.error(`getGroupMembersFromController: error is ${JSON.stringify(error)} ${JSON.stringify(new Error().stack)}`); | |||
this.error(`getGroupMembersFromController: ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
@@ -369,7 +379,7 @@ | |||
} catch (error) { | |||
this.sendError(error); | |||
if (error) { | |||
this.error(`getGroupMembersFromController: error is ${JSON.stringify(error)} ${JSON.stringify(new Error().stack)}`); | |||
this.error(`getGroupMembersFromController: ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
} | ||
catch (error) | ||
{ | ||
this.log.error(`error sending ${type} ${cmd} to endpoint: ${(error && error.message ? error.message : 'no error message')} ${(error && error.stack ? error.stack : 'no call stack')}`) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
this.log.debug(`Device query for '${entity.device.ieeeAddr}' started`); | ||
if (has_elevated_debug) | ||
this.log.warn(`ELEVATED O06: Device query for '${entity.device.ieeeAddr}/${entity.device.endpoints[0].ID}' triggered`); | ||
let t; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Fix battery status for Ikea Parasoll Devices
Fix random crashes due to unhandled promise rejection (I hope I caught them all now)