From f4de779f9916bdae63c2bddd9d3fcac774048f7b Mon Sep 17 00:00:00 2001 From: Tom Winter Date: Thu, 29 Feb 2024 14:47:29 +0100 Subject: [PATCH] fix: use boolean to parse sentry config enabled flag --- src/sentry.configuration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sentry.configuration.ts b/src/sentry.configuration.ts index fcbcc5b..3816dc5 100644 --- a/src/sentry.configuration.ts +++ b/src/sentry.configuration.ts @@ -4,7 +4,7 @@ import { ArgumentsHost, INestApplication } from '@nestjs/common'; import { BaseExceptionFilter, HttpAdapterHost } from '@nestjs/core'; export class SentryConfiguration { - ENABLED = ''; + ENABLED: boolean = false; DSN = ''; INSTANCE_NAME = ''; ENVIRONMENT = ''; @@ -26,7 +26,7 @@ export function configureSentry( configService: ConfigService, ): void { const sentryConfiguration = loadSentryConfiguration(configService); - if (sentryConfiguration.ENABLED === 'true') { + if (sentryConfiguration.ENABLED) { configureLoggingSentry(app, sentryConfiguration); } }