diff --git a/src/main/java/com/gdschongik/gdsc/domain/discord/application/CommonDiscordService.java b/src/main/java/com/gdschongik/gdsc/domain/discord/application/CommonDiscordService.java index da1e1e62c..4175930d0 100644 --- a/src/main/java/com/gdschongik/gdsc/domain/discord/application/CommonDiscordService.java +++ b/src/main/java/com/gdschongik/gdsc/domain/discord/application/CommonDiscordService.java @@ -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 { @@ -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()); + } }); } }