Depending on how much she ate, your dog should be fine if she ate some vanilla cake. Vanilla cake is safe for dogs to eat, but it's high in sugar, which they don't need in their diet. Sugar has no nutritional value whatsoever. Weight gain and diabetes are both linked to long-term consumption of sugar.