Skip to content

Commit

Permalink
add error log
Browse files Browse the repository at this point in the history
  • Loading branch information
adisreyaj committed Apr 10, 2024
1 parent 8e29032 commit 95a01fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/api/src/app/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppMetadata, UserMetadata>;
authClient: AuthenticationClient;
private logger = this.compitoLogger.getLogger('USER');

constructor(
private config: ConfigService,
private prisma: PrismaService,
Expand Down Expand Up @@ -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');
}
}
Expand Down

0 comments on commit 95a01fb

Please sign in to comment.