From df79defa18f879c2f87d40ef5e55e489f9f3abc1 Mon Sep 17 00:00:00 2001 From: BrightSec Date: Fri, 30 Oct 2026 09:17:28 +0100 Subject: [PATCH 1/6] chore: initialize Bright security scan From 1d166d9738eeebfd40d3a73bb96d41d664f45e51 Mon Sep 17 00:00:00 2001 From: BrightSec Date: Fri, 30 Oct 2026 09:28:38 +0100 Subject: [PATCH 2/6] chore: initialize Bright security scan From 2723666fd3cd37e833f63c8471c3f189ca68c655 Mon Sep 17 00:00:00 2001 From: BrightSec Date: Fri, 30 Oct 2026 09:47:43 +0100 Subject: [PATCH 3/6] chore: initialize Bright security scan From 392f17aada6c7af0db56d0ec6a380a946d9aa3a7 Mon Sep 17 00:00:00 2001 From: BrightSec Date: Thu, 5 Nov 2026 09:41:06 +0100 Subject: [PATCH 4/6] chore: initialize Bright security scan From 8a99c1f7d0d4b62e5d6e7dd6fc7cfb16a8db75e6 Mon Sep 17 00:00:00 2001 From: BrightSec Date: Mon, 9 Nov 2026 12:44:44 +0100 Subject: [PATCH 5/6] chore: initialize Bright security scan From e37c25f820e6d3f780d503d0de5c946c2834c0ae Mon Sep 17 00:00:00 2001 From: BrightSec Date: Mon, 9 Nov 2026 15:19:10 +0100 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20medium=20=E2=80=94=20Database=20Erro?= =?UTF-8?q?r=20Message=20Disclosure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/testimonials/testimonials.service.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/testimonials/testimonials.service.ts b/src/testimonials/testimonials.service.ts index bd2942d8c5..330d1ba662 100644 --- a/src/testimonials/testimonials.service.ts +++ b/src/testimonials/testimonials.service.ts @@ -1,6 +1,10 @@ import { EntityManager, EntityRepository } from '@mikro-orm/core'; import { InjectRepository } from '@mikro-orm/nestjs'; -import { Injectable, Logger } from '@nestjs/common'; +import { + Injectable, + InternalServerErrorException, + Logger +} from '@nestjs/common'; import { Testimonial } from '../model/testimonial.entity'; @Injectable() @@ -60,8 +64,9 @@ export class TestimonialsService { return (await this.em.getConnection().execute(query))[0].count as number; } catch (err) { - this.logger.warn(`Failed to execute query. Error: ${err.message}`); - return err.message; + const message = err instanceof Error ? err.message : String(err); + this.logger.warn(`Failed to execute query. Error: ${message}`); + throw new InternalServerErrorException('Failed to execute query'); } } }