From dbfc49e4b5b1208d6a66e8725c4b9cc82d956f8e Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Mon, 23 Sep 2024 05:56:39 -0700 Subject: [PATCH] enh: discord error reporting --- packages/pockethost/src/core/discordAlert.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pockethost/src/core/discordAlert.ts b/packages/pockethost/src/core/discordAlert.ts index 8bbd7617..cf5a7503 100644 --- a/packages/pockethost/src/core/discordAlert.ts +++ b/packages/pockethost/src/core/discordAlert.ts @@ -6,7 +6,7 @@ const cache: { [_: string]: NodeJS.Timeout } = {} export const discordAlert = (message: { toString: () => string }) => { const url = DISCORD_ALERT_CHANNEL_URL() if (!url) return - const m = message.toString() + const m = `${message}${message instanceof Error ? `\n${message.stack}` : ''}` const isCached = !!cache[m] if (isCached) { clearTimeout(cache[m])