Skip to content

Commit

Permalink
bug while checking connection fixed
Browse files Browse the repository at this point in the history
TKnpl committed Jan 27, 2021
1 parent f589e64 commit 80464e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ class Divera247 extends utils.Adapter {

if (diveraAccessKey && pollIntervallSeconds) {
if (pollIntervallSeconds >= pollIntervallSecondsMinimum) {
if (this.checkConnectionToApi(diveraAccessKey)) {
if (await this.checkConnectionToApi(diveraAccessKey)) {
// Connected to API
this.setState('info.connection', true, true);

@@ -234,7 +234,7 @@ class Divera247 extends utils.Adapter {
if (error.response) {
// The request was made and the server responded with a error status code
if (error.response.status == 403) {
this.log.error('Access-Token is invalid. Please use a valid token!');
this.log.error('Access-Token has been invalid. Please use a valid token!');
this.setState('info.connection', false, true);
} else {
this.log.warn('received error ' + error.response.status + ' response with content: ' + JSON.stringify(error.response.data));

0 comments on commit 80464e1

Please sign in to comment.