Skip to content

Commit

Permalink
Fix console log
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPonchia committed Dec 3, 2024
1 parent 03a7636 commit b5b1c03
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/active-campaign-client/src/handlers/sqsQueueHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }),
Expand Down

0 comments on commit b5b1c03

Please sign in to comment.