As you relax with your guests, patting yourself on the back for another wonderful Thanksgiving feast, you hear the unmistakable sound of very bad news.

Rushing into the kitchen, you see your dog retching over something exceedingly unpleasant.

Nearby, remnants of the meal spill from a torn trash bag. Putting two and two together, you get “yuck.”

Yet the accident could have been easily avoided.

How to prevent pet puke during the holidays

There are several things you can do to ensure that the holiday season passes with no trips to the vet or nasty carpet stains.

Most canine-based problems start at the end of the meal.

MORE:Hidden holiday dangers for your pets

As dishes are taken from the table and piled in the kitchen, free-range leftovers are at their most vulnerable. The rich scent of roasted turkey, stuffing and trimmings calls out to the ancient part of the dog’s brain tasked with one thing: Foraging.

While the high-fat foods common to the holiday can cause upset stomach, nausea, diarrhea and worse in dogs, turkey bones can do serious damage and are potentially fatal, the American Veterinary Medical Association warns.

Be sure to secure the turkey carcass, never assuming it is out of reach simply because it appears to be out of reach. Dogs are both imaginative and determined. (Just search for “counter surfing dogs” on YouTube.) Place the carcass in a plastic bag and drop it into a sealed trash bin, preferably outside.

If you find your dog gnawing on a bit of skeletal turkey, the safest move is to take her to the emergency vet. Those narrow bones can cause severe internal injuries.

The same vigilance is needed for platters of stuffing, sweet potatoes and other foods intended. Place leftovers in the fridge right away and put the trash outside before returning to your guests.

MORE:10 ways to give back to the community with your kids

Mishaps may also occur before and during the meal. Resist the urge to slip food to your dog because you're in a festive mood.

A bite or two of plain turkey is fine, but place it in the dog bowl so as not to encourage begging. And be sure the meat is free of seasonings whose unfamiliarity can upset a dog's digestive system.

But turkey skin is off limits for canines, the AVMA says. The high fat content could trigger pancreatitis, brought on when the pancreas struggles to produce the enzymes necessary to break down food.

That means all fatty foods should be kept far from dogs.

If you want your dog to have a treat, prepare a small helping of the giblets, including the gizzard, liver and heart. The neck is off limits due to the bones.

Sweets are off limits as well, particularly chocolate, which can be poisonous. While a large dog (50 pounds or heavier) will be fine sneaking a couple of bites, smaller dogs (10 pounds) could be harmed by an ounce or two.

MORE:20 tips for handling holiday houseguests

The darker the chocolate, the worse it is for dogs. Bakers' and dark chocolate are far more toxic than milk chocolate. White chocolate is relatively harmless, as your pooch would have to eat nearly 5 pounds for every pound she weighs to hit dangerous levels. If she does that, chocolate toxins will be the least of your problems.

Most owners know that chocolate is bad for dogs, but they may not know that other potentially dangerous foods may be on the Thanksgiving table.

• Grapes and raisins contain something (it has yet to be pinpointed) that may cause kidney damage.

• Nuts have a high fat content that can cause vomiting, diarrhea and pancreatitis.

• Salty snacks may cause excessive thirst and urination. A dog that eats too many could suffer from sodium ion poisoning.

• Garlic, onions and chives irritate canine stomachs.

Cats also may suffer ill effects from eating people food, and many of the things that irritate canine digestive tracts can do the same to felines. Cats also are more prone to munching on decorative plants, many of which can be poisonous. Check out the ASPCA's list of potentially harmful plants.

In most cases, vomiting and diarrhea are early signs of trouble. Call the ASPCA Animal Poison Control Center at 888-426-4435. It's answered 24 hours a day, 365 days a year. A $65 consultation fee may apply.

If your dog is lethargic or in pain, a trip to the vet is highly recommended. Keep the name and phone number of the nearest emergency vet on hand.

The USA TODAY Network and Thanksgiving.com, America’s home for the holidays, are here to help you make those special times of year with family and friends even brighter. Whether you're looking for recipes, how-to food videos, seasonal decor ideas, or delicious new desserts, we've got you covered. Thanksgiving.com is produced by USA TODAY Network newsrooms and Grateful Ventures, a part of the Network.