Filtering out UserCancelledAction

This commit is contained in:
dankito 2024-08-26 22:39:48 +02:00
parent 8753d4c6d8
commit b6b88d31a1
1 changed files with 5 additions and 1 deletions

View File

@ -74,10 +74,14 @@ class BankingService(
}
private fun handleUnsuccessfulBankingClientResponse(action: BankingClientAction, response: Response<*>) {
log.error { "$action was not successful: $response" }
response.error?.let { error ->
if (error.type != ErrorType.UserCancelledAction) { // the user knows that she cancelled the action
uiState.bankingClientErrorOccurred.value = BankingClientError(action, error)
}
}
}
private suspend fun readTransactionsFromCsv(): List<AccountTransaction> {
val csv = Res.readBytes("files/transactions.csv").decodeToString()