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

Commit

Permalink
Clarify logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdhjd committed Jul 17, 2020
1 parent 63f21a0 commit 93dabb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/myq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class myQ {
});

if(!response) {
this.log("myQ API error: unable to authenticate. Will retry later.");
this.log("myQ API: unable to authenticate. Will retry later.");
return false;
}

Expand Down Expand Up @@ -219,7 +219,7 @@ export class myQ {
});

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

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

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

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

return response;
} catch(error) {
this.log.error("Fetch error encountered: " + error);
this.log.error(error);
return null as unknown as Promise<Response>;
}
}
Expand Down

0 comments on commit 93dabb2

Please sign in to comment.