Earlier quoted context omitted.
I was once in a presentation for a math PhD thesis. During the thesis, the evaluator of the thesis noticed a flaw in their proof. The student understood and then asked “What now?” The evaluator prof simply shrugged.
That sounds like the worst "exam nightmare" scenario imaginable, but did the student get the PhD in the end?
Sometimes, of course, the proof is just wrong. That is the dangerous case, which will cause either major corrections or failure.