One thing I realized recently while interviewing candidates at my company is that it’s one of the few opportunities that individual contributors like myself have to exert significant power over someone else, and not everyone is prepared to handle it well. Recently, we had a candidate come through that wasn’t a good fit for us (he claimed to be a cypress expert so we asked him to set cypress up in a dummy react repo a…
If I was floundering because the interviewer found a hole in my knowledge (and there are many holes in Albert Hall) I'd proactively state that and say where the holes weren't and ask for a question about that.
For example, I've implemented a complete C compiler, front to back, so at one point I knew everything about C. But in implementing a new C compiler (ImportC) a few months back, I had to go over the Standard again, as I'd forgotten bits and pieces.
There's no reason at all why the interviewee cannot drive the direction of the interview, rather than being driven. For example, when I interviewed for a software job after leaving my mechanical job at Boeing, I was concerned that I wouldn't be taken seriously as a programmer. So I brought along listings of the code I'd written and pulled it out during the interview and proceeded to explain it to the interviewer, on my own initiative.
A long time after that, I was talking to the interviewer, and he said that that was what got me the offer.