It happens to all of us from time to time.
Sometimes it can be saved with some quick thinking, e.g. if the audience caught a glimpse of a control and says the card is on top or bottom you may be able to palm it off and take it out of your pocket, this has worked for me before.
If it's something 'bigger' e.g. they see a card in a palm, there's not much you can do aside from just carrying on with another effect, don't give them anytime to think about how you messed up. I wouldn't recommend trying to bs your way out of something like this, just admit your mistake and move on.