mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 10:41:56 +10:00
fix: add logger for errors, return correct error when resume is locked
This commit is contained in:
@ -3,6 +3,7 @@ import {
|
||||
ForbiddenException,
|
||||
Injectable,
|
||||
InternalServerErrorException,
|
||||
Logger,
|
||||
} from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { JwtService } from "@nestjs/jwt";
|
||||
@ -115,6 +116,7 @@ export class AuthService {
|
||||
throw new BadRequestException(ErrorMessage.UserAlreadyExists);
|
||||
}
|
||||
|
||||
Logger.error(error);
|
||||
throw new InternalServerErrorException(error);
|
||||
}
|
||||
}
|
||||
@ -213,6 +215,7 @@ export class AuthService {
|
||||
|
||||
await this.mailService.sendEmail({ to: email, subject, text });
|
||||
} catch (error) {
|
||||
Logger.error(error);
|
||||
throw new InternalServerErrorException(error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user