From 0410f54df24a2217ef62f95a998f024f042ff056 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Sat, 28 Mar 2020 10:41:37 +0100 Subject: [PATCH] fallback for better debugging, for now --- src/skype.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/skype.ts b/src/skype.ts index 04dd319..ba09a26 100644 --- a/src/skype.ts +++ b/src/skype.ts @@ -185,6 +185,7 @@ export class Skype { const MINUTE = 60000; client.on("error", async (err: Error) => { log.error("Error when polling"); + log.error(err.name); log.error(err); if (err.name === "UnexpectedHttpStatus") { await this.puppet.sendStatusMessage(puppetId, "Error: " + err); @@ -193,6 +194,10 @@ export class Skype { setTimeout(async () => { await this.startClient(puppetId); }, 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 {