diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/BankResponse.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/BankResponse.kt index f90e83a8..090877be 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/BankResponse.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/BankResponse.kt @@ -25,7 +25,11 @@ open class BankResponse( get() = messageCreationError == null open val responseContainsErrors: Boolean - get() = errorMessage == null && messageFeedback?.isError == true + get() = errorMessage == null && + (messageFeedback?.isError == true || isPinLocked) + + open val isPinLocked: Boolean + get() = segmentFeedbacks.flatMap { it.feedbacks }.any { it.isPinLocked } open val wrongCredentialsEntered: Boolean get() { @@ -98,7 +102,7 @@ open class BankResponse( } protected open fun mapToMessageToShowToUser(feedback: Feedback): String? { - if (feedback.isError) { + if (feedback.isError || feedback.isPinLocked) { if (feedback.responseCode != 9800) { // filter out 'Dialogabbruch' feedbacks, is of no value to user return "${feedback.responseCode}: ${feedback.message}" } diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/segments/Feedback.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/segments/Feedback.kt index 0920920c..24c0b55f 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/segments/Feedback.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/segments/Feedback.kt @@ -45,6 +45,9 @@ open class Feedback( val isWarning: Boolean get() = responseCode in 3000..3999 + val isPinLocked: Boolean + get() = responseCode in 3930..3939 + val isError: Boolean get() = responseCode in 9000..9999