Skip to content

Commit

Permalink
Merge pull request #6 from kovapatrik/fix/hide-error-stack
Browse files Browse the repository at this point in the history
fix: show error stack only in debug mode
  • Loading branch information
kovapatrik authored May 30, 2024
2 parents 616db4a + 70f1415 commit a81f8ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge BlueAir Platform",
"name": "homebridge-blueair-purifier",
"version": "1.0.8",
"version": "1.0.9",
"description": "Homebridge plugin for BlueAir purifiers",
"license": "Apache-2.0",
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export class BlueAirPlatform extends EventEmitter implements DynamicPlatformPlug
}
this.log.debug('Devices states updated!');
} catch (error) {
this.log.warn('Error getting valid devices status, reason:', error, '. Retrying in 5 seconds...');
const err = error as Error;
this.log.warn('Error getting valid devices status, reason:' + err.message + '. Retrying in 5 seconds...');
this.log.debug('Error stack:', err.stack);
} finally {
this.polling = setTimeout(this.getValidDevicesStatus.bind(this), this.platformConfig.pollingInterval);
}
Expand Down

0 comments on commit a81f8ac

Please sign in to comment.