Last year on my birthday, we dropped Kita off at doggy daycare for the day so that we could celebrate. An hour or so later, we got a call that Kita had thrown up so he was taken to our vet (conveniently also at Petsmart) and we got him checked out. Turns out he had thrown up quite a few items, including what seemed to be some plastic and a little duct tape. We are so careful not to leave things out for him to get into, but he managed to swallow these down without us knowing. He had to have a lot of expensive tests done, and it turned out he had Giardia, a parasite found in water that he likely picked up from swimming at a local dog park. He needed to rest a lot, so much to his dismay, we took away his toys and wouldn't play with him for a month. He threw up every day for a few months as we continued to change his diet and see what he could handle.
Eventually, we also discovered that he is allergic to chicken, which is a terrible thing for a dog to be allergic to as it is an ingredient in most treats, biscuits and even some rawhides. When we are out, we have to be constantly vigilant that he isn't fed treats that we don't know the ingredients of, because people constantly want to give him something for being so friendly. I'm sure he gets annoyed with us, but we take his health very seriously, and even stayed home for Christmas so that he didn't have to be boarded or travel while ill. That is something a lot of people don't understand and I felt bad about not making it to see our families, but either of us wouldn't leave him when he was sick. Kita still throws up now and then, and he warns us by begging to go outside first. We are careful to never scold him no matter where he throws up, as he is already upset and embarrassed when it happens. We simply put him in his crate to rest while we clean up the mess. Within 10 minutes, he is happy and playing as if he never was sick.
If your dog gets sick, there are a ton of online resources to use: I've compiled a list on our cat Seph's blog. Tests and treatments can be expensive, so pet insurance can be a lifesaver. The pet insurance we got for the dogs is directly through Banfield at Petsmart, and has literally saved us hundreds of dollars. Make sure that they aren't running unnecessary tests and to go over the prices beforehand, as they may be able to rule some illnesses out first or offer you payment plans or cheaper options. If your dog seems sick after eating particular foods, even a day later, try removing that ingredient from their diet if possible, but understand that it could take a few months to completely get it out of their system.
Kita also rarely throws up after he eats, so despite him not being hungry in the morning, we try to get him to eat as early as possible rather than waiting until the evening to eat. This can sometimes require us to mix something he really likes into his food to make it more appealing, including peanut butter or some wet dog food. My only other suggestions are to make sure you know what other people are feeding your dog and don't let them swim in bodies of water that you aren't sure about the safety of. For me, its always better to be safe than sorry, even if it means a dog might miss out on something he enjoys.