Skip to content

Commit

Permalink
Merge pull request #2294 from HedvigInsurance/fix/fetch-coinsured-crash
Browse files Browse the repository at this point in the history
fix outOfBonds crash
  • Loading branch information
StylianosGakis authored Nov 15, 2024
2 parents f77983b + 91036ea commit 82aab41
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class FetchCoInsuredPersonalInformationUseCaseImpl(
.safeExecute(::ErrorMessage)
.bind()
if (result.personalInformation == null) {
val birthdate = convertSsnToBirthDateOrNull(ssn)
val birthdate = if (ssn.length>=8) convertSsnToBirthDateOrNull(ssn) else null
CoInsuredPersonalInformation.EmptyInfo(birthdate)
} else {
CoInsuredPersonalInformation.FullInfo(
Expand Down

0 comments on commit 82aab41

Please sign in to comment.