From 95a01fb0fc8cd82b5300137574eb2a44ed93164e Mon Sep 17 00:00:00 2001 From: Adithya Sreyaj Date: Wed, 10 Apr 2024 15:32:13 +0530 Subject: [PATCH] add error log --- apps/api/src/app/user/user.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 92fa3ff..ec15d32 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -20,12 +20,13 @@ import { getUserDetails } from '../core/utils/payload.util'; import { parseQuery } from '../core/utils/query-parse.util'; import { PrismaService } from '../prisma.service'; import { USER_BASIC_DETAILS } from '../task/task.config'; + @Injectable() export class UserService { - private logger = this.compitoLogger.getLogger('USER'); - managementClient: ManagementClient; authClient: AuthenticationClient; + private logger = this.compitoLogger.getLogger('USER'); + constructor( private config: ConfigService, private prisma: PrismaService, @@ -126,7 +127,7 @@ export class UserService { if (error instanceof HttpException) { throw error; } - this.logger.error('getUserDetails', 'Failed to fetch user details'); + this.logger.error('getUserDetails', 'Failed to fetch user details', error); throw new InternalServerErrorException('Failed to fetch user details'); } }