From b5b1c031d7cf6c0c3a2f83fd8db3fef1201d4cbe Mon Sep 17 00:00:00 2001 From: Marco Ponchia Date: Tue, 3 Dec 2024 15:37:01 +0100 Subject: [PATCH] Fix console log --- .../src/handlers/sqsQueueHandler.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/active-campaign-client/src/handlers/sqsQueueHandler.ts b/packages/active-campaign-client/src/handlers/sqsQueueHandler.ts index 96172de38..3522ef77f 100644 --- a/packages/active-campaign-client/src/handlers/sqsQueueHandler.ts +++ b/packages/active-campaign-client/src/handlers/sqsQueueHandler.ts @@ -33,15 +33,11 @@ export async function sqsQueueHandler(event: { queueEvent.webinarId || '' ); default: - console.log('Unknown event:', queueEvent.detail.eventName); - break; + // eslint-disable-next-line functional/no-throw-statements + throw new Error('Unknown event'); } - return { - statusCode: 200, - body: JSON.stringify(event), - }; } catch (error) { - console.error('Error:', error); + console.error('Error:', error); // TODO: Remove after testing return { statusCode: 500, body: JSON.stringify({ message: 'Internal server error' }),