fix: dont log error object before handling

This commit is contained in:
Marius Begby committed 2023-09-10 20:57:29 +02:00
1 parent 851e9321f5
commit c35a3ad5aa
1 file changed
+2 -2
+2 -2
View File
@@ -28,7 +28,7 @@ export const handleError = async (
executionId: executionId executionId: executionId
}); });
if (error instanceof InteractionValidationError) { if (error instanceof InteractionValidationError || error.type === 'InteractionValidationError') {
logger.debug( logger.debug(
`Interaction validation error '${error.message}' while handling interaction '${interactionIdentifier}'.` `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) { if (interaction instanceof ChatInputCommandInteraction) {
switch (interaction.replied) { switch (interaction.replied) {