Skip to content
This repository was archived by the owner on Apr 28, 2024. It is now read-only.

Commit 93dabb2

Browse files
committed
Clarify logging.
1 parent 63f21a0 commit 93dabb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/myq.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class myQ {
135135
});
136136

137137
if(!response) {
138-
this.log("myQ API error: unable to authenticate. Will retry later.");
138+
this.log("myQ API: unable to authenticate. Will retry later.");
139139
return false;
140140
}
141141

@@ -219,7 +219,7 @@ export class myQ {
219219
});
220220

221221
if(!response) {
222-
this.log("myQ API error: unable to login. Will refresh the security token and retry later.");
222+
this.log("myQ API: unable to login. Acquiring a new security token and retrying later.");
223223
await this.acquireSecurityToken();
224224
return false;
225225
}
@@ -277,7 +277,7 @@ export class myQ {
277277
});
278278

279279
if(!response) {
280-
this.log("myQ API error: unable to refresh. Will refresh the security token and retry later.");
280+
this.log("myQ API: unable to refresh. Acquiring a new security token and retrying later.");
281281
await this.acquireSecurityToken();
282282
return false;
283283
}
@@ -358,7 +358,7 @@ export class myQ {
358358
});
359359

360360
if(!response) {
361-
this.log("myQ API error: unable to query device. Will refresh the security token and retry later.");
361+
this.log("myQ API: unable to query device. Acquiring a new security token and retrying later.");
362362
await this.acquireSecurityToken();
363363
return false;
364364
}
@@ -399,7 +399,7 @@ export class myQ {
399399
});
400400

401401
if(!response) {
402-
this.log("myQ API error: unable to execute command. Will refresh the security token and retry later.");
402+
this.log("myQ API: unable to execute command. Acquiring a new security token and retrying later.");
403403
await this.acquireSecurityToken();
404404
return false;
405405
}
@@ -504,7 +504,7 @@ export class myQ {
504504

505505
return response;
506506
} catch(error) {
507-
this.log.error("Fetch error encountered: " + error);
507+
this.log.error(error);
508508
return null as unknown as Promise<Response>;
509509
}
510510
}

0 commit comments

Comments
 (0)