Skip to content

Commit a1fc72e

Browse files
committed
feat : DataIntegrityViolationException 예외 발생 시 동작 추가
1 parent 0f2afbb commit a1fc72e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/ezcode/codetest/domain/community/service/BaseVoteDomainService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public VoteResult manageVote(User voter, Long targetId, VoteType voteType) {
4040
// 중복 삽입 예외는 “이미 UP 상태”로 간주하고 흐름을 계속
4141
// 만약 이 로그가 빈번하게 발생한다면 어떤 이유로 연속 요청(따닥 문제)가 발생하는지 확인해봐야 함
4242
log.info("중복 추천 시도 감지 (따닥 문제): voter={} target={}", voter.getId(), targetId);
43+
44+
prevVoteType = VoteType.UP;
4345
}
4446
}
4547
}

0 commit comments

Comments
 (0)