If your palming a card, even if for only a moment and someone shouts 'you have a card in THAT hand!'
everyones focus is attached to 'that hand' and ruins the sleight
do you just continue through the trick as usual not paying attention or have you just killed your magic reputation
First off, pick up Bob White's Practical Card Palming. It will help you so much so you never have to deal with this situation.
When they blurt it out, get into classic magician in trouble scenario look on your face.
Raise your hand up a little to bring their focus away from your pocket level. You now have perfect misdirection (their attention fixed to your hand) to turn slightly bring the card closer to the audience (still not revealed) and ditch the rest of the deck in your other pocket.
Say the trick messed up. Somewhere you have lost the entire deck except for the one card. Pause for a minute to let what you had said, sink in and let them realize that the deck is in fact gone, and you are left with but a single card.
Ask the spectator to say aloud, what their selected card was. Then reveal card that is palmed.