Skip to content

Commit

Permalink
fix: not valid error code
Browse files Browse the repository at this point in the history
  • Loading branch information
siwonpada committed Mar 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1797ab1 commit fd1bae3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/user/user.repository.ts
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export class UserRepository {
.catch((error) => {
if (
error instanceof PrismaClientKnownRequestError &&
error.code === 'P2022'
(error.code === 'P2002' || error.code === 'P2025')
) {
this.logger.debug(`user not found: ${email}`);
throw new ForbiddenException('존재하지 않는 유저입니다.');
@@ -56,7 +56,7 @@ export class UserRepository {
.catch((error) => {
if (
error instanceof PrismaClientKnownRequestError &&
error.code === 'P2022'
error.code === 'P2025'
) {
this.logger.debug(`user not found: ${uuid}`);
throw new ForbiddenException('존재하지 않는 유저입니다.');
@@ -113,7 +113,7 @@ export class UserRepository {
})
.catch((error) => {
if (error instanceof PrismaClientKnownRequestError) {
if (error.code === 'P2022' || error.code === 'P2002') {
if (error.code === 'P2025' || error.code === 'P2002') {
this.logger.debug(`user not found: ${email}`);
throw new ForbiddenException('존재하지 않는 유저입니다.');
}
@@ -136,7 +136,7 @@ export class UserRepository {
.catch((error) => {
if (
error instanceof PrismaClientKnownRequestError &&
error.code === 'P2022'
error.code === 'P2025'
) {
this.logger.debug(`user not found: ${email}`);
throw new ForbiddenException('존재하지 않는 유저입니다.');

0 comments on commit fd1bae3

Please sign in to comment.