diff --git a/bank_transactions/absa_bank_transactions.go b/bank_transactions/absa_bank_transactions.go index 815234210ff778f52642304b2c23fc04fbcb38b4..1f2400bd3d0327c2b86bf1325225c4ad6dd249f9 100644 --- a/bank_transactions/absa_bank_transactions.go +++ b/bank_transactions/absa_bank_transactions.go @@ -23,6 +23,8 @@ type AbsaLoginInfo struct { IsDebug bool } +var ErrPasswordChange = errors.Error("Absa CIB requires a password change") + const ( sleepTime = time.Second * 2 ) @@ -194,6 +196,10 @@ func login(client *resty.Client, loginInfo AbsaLoginInfo) error { } } + if strings.Contains(string(responseBytes), "New Password") { + return ErrPasswordChange + } + return nil }