Skip to content

Commit

Permalink
hotfix: 디스코드 ID 배치 예외 처리 (#705)
Browse files Browse the repository at this point in the history
* fix: 디스코드 id 배치 예외 처리

* fix: 로그 수정
  • Loading branch information
Sangwook02 authored Aug 28, 2024
1 parent 0b16b50 commit 9c87b8a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
import com.gdschongik.gdsc.global.util.DiscordUtil;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@RequiredArgsConstructor
public class CommonDiscordService {
Expand Down Expand Up @@ -40,8 +42,12 @@ public void batchDiscordId(String currentDiscordUsername, RequirementStatus disc

discordSatisfiedMembers.forEach(member -> {
String discordUsername = member.getDiscordUsername();
String discordId = discordUtil.getMemberIdByUsername(discordUsername);
member.updateDiscordId(discordId);
try {
String discordId = discordUtil.getMemberIdByUsername(discordUsername);
member.updateDiscordId(discordId);
} catch (CustomException e) {
log.info("[CommonDiscordService] 디스코드 id 배치 실패: 사유 = {} memberId = {}", e.getMessage(), member.getId());
}
});
}
}

0 comments on commit 9c87b8a

Please sign in to comment.