Skip to content

Scheduling infrastructure for absolutely everyone.

fix: add event type validation (#24429)

Udit Takkar71bd140fe4a0
diff --git a/packages/features/bot-detection/BotDetectionService.ts b/packages/features/bot-detection/BotDetectionService.ts
index 2f8a8712198..e0026f43228 100644
--- a/packages/features/bot-detection/BotDetectionService.ts
+++ b/packages/features/bot-detection/BotDetectionService.ts
@@ -33,6 +33,10 @@ export class BotDetectionService {
return;
}
+ if (!Number.isInteger(eventTypeId) || eventTypeId <= 0) {
+ throw new Error(`Invalid eventTypeId: ${eventTypeId}. Must be a positive integer.`);
+ }
+
// Fetch only the teamId from the event type
const eventType = await this.eventTypeRepository.getTeamIdByEventTypeId({
id: eventTypeId,