Skip to content

Commit

Permalink
Merge pull request #65 from hmrc/non-uk-issue
Browse files Browse the repository at this point in the history
TAV-574: Add error handling for non-uk lookup.
  • Loading branch information
ssaleem-ee authored Jun 14, 2022
2 parents 1e3a4b9 + 4b0373a commit 8d3e98a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/AddressSearchController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ class AddressSearchController @Inject()(addressSearch: ABPAddressRepository, non
auditNonUKAddressSearch(userAgent, a, countryCode, Option(filter))
logEvent("LOOKUP", origin, a.size, List("countryCode" -> countryCode, "filter" -> filter))
Ok(Json.toJson(a))
}.recover{
case e: Throwable => logEvent("LOOKUP-NONUK-ERROR", "errorMessage" -> e.getMessage)
ExpectationFailed
}
}
}
Expand Down

0 comments on commit 8d3e98a

Please sign in to comment.