Baby threw up after new food

Em

I just gave my 6 month old red lentils for the first time today. She gagged and then threw up while eating. Twenty minutes later, she threw up again. Could this be an allergy? Or just her gag reflex making her nauseous?