Short answer
The vet will first ask what was in the cake to assess the risk. They may run blood tests to check organ function, especially if chocolate or xylitol is suspected, and provide supportive care like fluids and anti-nausea medication. Recovery is usually quick if treatment starts early, but monitoring at home for lingering vomiting or lethargy for the next 24 hours is important. If your cat shows any signs like drooling or weakness, contact your own vet right away.
Cake — Food safety facts
Feed with care · Cats · full breakdown on the linked food page
Check what is in it: chocolate, raisins and xylitol all appear in cakes and are all toxic.
The full verdict, portion guidance and serving notes are collected on the Cake food facts page.