What happens when a serious crisis happens in the middle of a performance? Whether playing classical or popular music, the answer is the same: keep going. Do your best to make the mistake look like it was planned. Smile.
A few years ago Eric was part of Watching Judas, a pop rock/electronica band that played original music. They signed up to participate in an area-wide battle of the bands.
A local radio station broadcast the battle, and I was able to listen to it. WJ's song started badly; it sounded dissonant and confused, but only for several seconds. Then the band hit their groove and finished well.
Later we learned what happened. All bands were required to use the same keyboard, and the previous band's keyboardist had set the transpose button up a half step. Eric didn't know this until he started playing and realized he was actually playing in the key of Gb. He immediately transposed the entire song into G# and finished the song.
Another band won the competition, but Watching Judas-- especially Eric-- deserved a medal for best participant in the "show must go on" category.