From 48f2f44f21451e6c2691aff039f2d69e13ebf126 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Tue, 29 Aug 2023 20:48:51 +0200 Subject: [PATCH] fix: Handle "unknown interaction" with log message and return --- src/handlers/interactionErrorHandler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/handlers/interactionErrorHandler.ts b/src/handlers/interactionErrorHandler.ts index b7dd344..9b769d2 100644 --- a/src/handlers/interactionErrorHandler.ts +++ b/src/handlers/interactionErrorHandler.ts @@ -63,6 +63,11 @@ export const handleError = async ( return; } + if (error.message === 'Unknown Interaction') { + logger.debug('Interaction has already been responded to or does no longer exist.'); + return; + } + logger.fatal(error, 'Unhandled error while awaiting or handling component interaction.'); return; }