diff --git a/src/skype.ts b/src/skype.ts index 54e5937..148683f 100644 --- a/src/skype.ts +++ b/src/skype.ts @@ -186,7 +186,10 @@ export class Skype { client.on("error", async (err: Error) => { log.error("Error when polling"); log.error(err.name); - log.error(err.cause.name); + const errr = err as any; + if (errr.cause) { + log.error(errr.cause.name); + } log.error(err.body); log.error(err); if (err.name === "UnexpectedHttpStatus") {