Failed assertions inside for loop is not failing the Gatling scenario

I’m trying to validate whether error messages returned by API are proper or not. So, I stored all local error message strings in HashMap errorMessage

 for ((k,v)<- errorMessages){
      assert(ResponseJSON.contains(v))
    }

I could see the error on console as

hook-3' crashed with 'java.lang.AssertionError: assertion failed', forwarding to the next one

But, the Gatling scenarios are not failing here, what is I’m missing ?

More Specifically this is how my code snipet look a like.

.doIf(errorMessages.size()>1) { 
    exec(session => {
   assert(ResponseJSON.contains(errorMessages.get("errorMessage1")))
   for ((k,v)<- errorMessages){
      assert(ResponseJSON.contains(v))
    }
}