From c35a3ad5aac96309f9f2afacd22186d2613d1e1a Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sun, 10 Sep 2023 20:57:29 +0200 Subject: [PATCH] fix: dont log error object before handling --- src/handlers/interactionErrorHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/interactionErrorHandler.ts b/src/handlers/interactionErrorHandler.ts index 8416051..724a3c3 100644 --- a/src/handlers/interactionErrorHandler.ts +++ b/src/handlers/interactionErrorHandler.ts @@ -28,7 +28,7 @@ export const handleError = async ( executionId: executionId }); - if (error instanceof InteractionValidationError) { + if (error instanceof InteractionValidationError || error.type === 'InteractionValidationError') { logger.debug( `Interaction validation error '${error.message}' while handling interaction '${interactionIdentifier}'.` ); @@ -47,7 +47,7 @@ export const handleError = async ( ] }; - logger.debug(error, `Error handling interaction '${interactionIdentifier}' with execution ID ${executionId}`); + logger.debug(`Error handling interaction '${interactionIdentifier}'`); if (interaction instanceof ChatInputCommandInteraction) { switch (interaction.replied) {