From 0ac4cc6899a2600acdc0eaa273d71c2660da58e4 Mon Sep 17 00:00:00 2001 From: Etienne <45695613+etiennejouan@users.noreply.github.com> Date: Thu, 22 May 2025 13:49:23 +0200 Subject: [PATCH] captcha - keep consistency with token send to validation (#12195) [Sentry error](https://twenty-v7.sentry.io/issues/6494360796/events/322590f8af5c4475beebb66e5f22a2f7/?environment=prod&project=4507072499810304&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=previous-event&seerDrawer=true&sort=date&stream_index=6) raised because of invalid argument type (undefined in some case when string is expected) closes https://github.com/twentyhq/core-team-issues/issues/869 and closes https://github.com/twentyhq/twenty/issues/12208 --- .../src/engine/core-modules/captcha/captcha.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-server/src/engine/core-modules/captcha/captcha.guard.ts b/packages/twenty-server/src/engine/core-modules/captcha/captcha.guard.ts index b8ba9c739..6199515ab 100644 --- a/packages/twenty-server/src/engine/core-modules/captcha/captcha.guard.ts +++ b/packages/twenty-server/src/engine/core-modules/captcha/captcha.guard.ts @@ -29,7 +29,7 @@ export class CaptchaGuard implements CanActivate { } else { await this.metricsService.incrementCounter({ key: MetricsKeys.InvalidCaptcha, - eventId: token, + eventId: token || '', }); throw new BadRequestException(