Fixed that response.errorsToShowToUser got mapped to an empty string instead of null if response.errorsToShowToUser is empty

This commit is contained in:
dankito 2020-09-20 16:00:39 +02:00
parent 63caf84894
commit 332c90a9e0
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ open class fints4kModelMapper(protected val modelCreator: IModelCreator) {
open fun mapErrorToShowToUser(response: FinTsClientResponse): String? {
val errorMessage = response.errorMessage
return errorMessage ?: response.errorsToShowToUser.joinToString("\n") // TODO: find a better way to choose which of these error messages to show
return errorMessage ?:
if (response.errorsToShowToUser.isEmpty()) null else response.errorsToShowToUser.joinToString("\n") // TODO: find a better way to choose which of these error messages to show
}