score:0

Accepted answer

I am not sure where but it seems that there was a case in this action that was not covered by my case structure. I refactored the action to this and it works fine now:

def form = Action.async {
  EsClient.execute(new IndexExistsQuery("fbl_indices")) flatMap { 
    index =>  if (index.status == 200) Future.successful(Ok("form"))
    else {
      EsClient.execute(new FillableSetupQuery()) map {
        indexCreated => Ok("form").flashing("success" -> "alles tutti")
      } recover {
        case e: Throwable => Ok("form error").flashing("error" -> "error indexerzeugung")
      }
    }
  } recover {
    case e: Throwable => Ok("form error").flashing("error" -> "error index query")
  }
}

Related Query

More Query from same tag