refactor: 로그인 이력 저장 실패시 AuthService로의 예외 전파 방지 로직 추가

This commit is contained in:
이상진 2025-09-12 20:53:36 +09:00
parent 77de425fc1
commit 81613562bc

View File

@ -45,6 +45,7 @@ class LoginHistoryService(
) {
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 시작: id=${principalId}, type=${principalType}, success=${success}" }
runCatching {
LoginHistoryEntity(
id = tsidFactory.next(),
principalId = principalId,
@ -56,5 +57,8 @@ class LoginHistoryService(
loginHistoryRepository.save(it)
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 완료: principalId=${principalId}, historyId=${it.id}" }
}
}.onFailure {
log.warn { "[LoginHistoryService] 로그인 이력 저장 중 예외 발생: message=${it.message} id=${principalId}, type=${principalType}, success=${success}, context=${context}" }
}
}
}