Skip to content

Commit

Permalink
chore: add logs for new client event (#2088) (#2089)
Browse files Browse the repository at this point in the history
Co-authored-by: Tommaso Piazza <[email protected]>
Co-authored-by: Yamil Medina <[email protected]>
Co-authored-by: Vitor Hugo Schwaab <[email protected]>
  • Loading branch information
4 people authored Sep 26, 2023
1 parent 45b6707 commit 5343e2f
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ internal class UserEventReceiverImpl internal constructor(

private suspend fun handleNewClient(event: Event.User.NewClient): Either<CoreFailure, Unit> =
clientRepository.saveNewClientEvent(event)
.onSuccess {
kaliumLogger
.logEventProcessing(
EventLoggingStatus.SUCCESS,
event
)
}
.onFailure {
kaliumLogger
.logEventProcessing(
EventLoggingStatus.FAILURE,
event,
Pair("errorInfo", "$it")
)
}

private suspend fun handleUserDelete(event: Event.User.UserDelete): Either<CoreFailure, Unit> =
if (selfUserId == event.userId) {
Expand Down

0 comments on commit 5343e2f

Please sign in to comment.