generated from pricelees/issue-pr-template
refactor: 로그인 이력 저장 실패시 AuthService로의 예외 전파 방지 로직 추가
This commit is contained in:
parent
77de425fc1
commit
81613562bc
@ -45,16 +45,20 @@ class LoginHistoryService(
|
|||||||
) {
|
) {
|
||||||
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 시작: id=${principalId}, type=${principalType}, success=${success}" }
|
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 시작: id=${principalId}, type=${principalType}, success=${success}" }
|
||||||
|
|
||||||
LoginHistoryEntity(
|
runCatching {
|
||||||
id = tsidFactory.next(),
|
LoginHistoryEntity(
|
||||||
principalId = principalId,
|
id = tsidFactory.next(),
|
||||||
principalType = principalType,
|
principalId = principalId,
|
||||||
success = success,
|
principalType = principalType,
|
||||||
ipAddress = context.ipAddress,
|
success = success,
|
||||||
userAgent = context.userAgent,
|
ipAddress = context.ipAddress,
|
||||||
).also {
|
userAgent = context.userAgent,
|
||||||
loginHistoryRepository.save(it)
|
).also {
|
||||||
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 완료: principalId=${principalId}, historyId=${it.id}" }
|
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}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user