From dda4313b269974313270826fd21d5f93d2f54f5b Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 11 Oct 2020 14:20:12 +0300 Subject: [PATCH] More error information --- backend/src/pluginUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts index 1bce7d7e..9cbd5f27 100644 --- a/backend/src/pluginUtils.ts +++ b/backend/src/pluginUtils.ts @@ -137,15 +137,15 @@ export function getPluginConfigPreprocessor( export function sendSuccessMessage(pluginData: AnyPluginData, channel, body) { const emoji = pluginData.fullConfig.success_emoji || undefined; - return channel.createMessage(successMessage(body, emoji)).catch(() => { - logger.warn(`Failed to send success message to ${channel.id} (${channel.guild?.id})`); + return channel.createMessage(successMessage(body, emoji)).catch(err => { + logger.warn(`Failed to send success message to ${channel.id} (${channel.guild?.id}): ${err.code} ${err.message}`); }); } export function sendErrorMessage(pluginData: AnyPluginData, channel, body) { const emoji = pluginData.fullConfig.error_emoji || undefined; - return channel.createMessage(errorMessage(body, emoji)).catch(() => { - logger.warn(`Failed to send error message to ${channel.id} (${channel.guild?.id})`); + return channel.createMessage(errorMessage(body, emoji)).catch(err => { + logger.warn(`Failed to send error message to ${channel.id} (${channel.guild?.id}): ${err.code} ${err.message}`); }); }