I nearly lost a cat a few years ago from tainted cat food, dry, Purina.
My two others never got sick but my oldest did. The vet said he had no idea what she had. No one knew about the bad food until months later when pets started dying. My old girl couldn't keep anything down or control the other end. After a 3 day hospital stay she came home. Vet couldn't identify what it was, tests came up negative. He was puzzled.
When I found out about the food, I called him. He said it could very well have been that. I had her on 3 medications, she lost a lot of weight. A week later, some different food, she recovered.
If your dog or cat vomits a lot or has uncontrollable diarrhea, get them to the vet quick. An animal can dehydrate very quickly.