They throw up yellow bile if they have an empty stomach & when that's all expelled, they'll throw up white foam. My vet also said they'll throw up yellow bile just from anticipating food, so a regular feeding schedule is important for them.
As for green beans, I was told not to get the canned ones because it contains sodium. The cooked frozen ones are good, organic being best.