mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-12-27 17:11:40 +00:00
fallback for better debugging, for now
This commit is contained in:
parent
bce6e78245
commit
0410f54df2
@ -185,6 +185,7 @@ export class Skype {
|
|||||||
const MINUTE = 60000;
|
const MINUTE = 60000;
|
||||||
client.on("error", async (err: Error) => {
|
client.on("error", async (err: Error) => {
|
||||||
log.error("Error when polling");
|
log.error("Error when polling");
|
||||||
|
log.error(err.name);
|
||||||
log.error(err);
|
log.error(err);
|
||||||
if (err.name === "UnexpectedHttpStatus") {
|
if (err.name === "UnexpectedHttpStatus") {
|
||||||
await this.puppet.sendStatusMessage(puppetId, "Error: " + err);
|
await this.puppet.sendStatusMessage(puppetId, "Error: " + err);
|
||||||
@ -193,6 +194,10 @@ export class Skype {
|
|||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.startClient(puppetId);
|
await this.startClient(puppetId);
|
||||||
}, MINUTE);
|
}, MINUTE);
|
||||||
|
} else {
|
||||||
|
log.error("baaaad error");
|
||||||
|
await this.puppet.sendStatusMessage(puppetId, "Super bad error, stopping puppet. Please restart the service to start it up again. This is for debugging purposes and will not be needed in the future");
|
||||||
|
await this.stopClient(puppetId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user