diff --git a/src/services/like.service.js b/src/services/like.service.js index ac6b1e7..cd2a1fa 100644 --- a/src/services/like.service.js +++ b/src/services/like.service.js @@ -1,5 +1,5 @@ import { - ValidationError, + EntityValidationError, DuplicateLikeMomentError, momentIdNotFoundError, LikeIdNotExistError, @@ -25,7 +25,7 @@ export const likeMoment = async (data) => { try { // 입력값 검증 if (!data.entityId || !data.entityType || !data.userId) { - throw new ValidationError(data); + throw new EntityValidationError(data); } // 게시글 존재 여부 확인 @@ -56,7 +56,7 @@ export const likeMoment = async (data) => { } catch (error) { // 사용자의 잘못된 요청 - if (error instanceof ValidationError || + if (error instanceof EntityValidationError || error instanceof momentIdNotFoundError || error instanceof DuplicateLikeMomentError) { throw error;