This story is obviously sourced mainly from Raphel and her friends/allies. Personally I view the FBI investigation as them just doing their jobs. In the end this wasn't really a failure on their part, assuming the innocent reason for all the suspicion was true, they investigated her as they were tasked and the DoJ ended the investigation when they realized there was no case. I think the interesting story is the chang…
"Doing their jobs" misses a huge part of the story. Someone illegally leaked the details of the ongoing investigation to the New York Times, changing what could have been a temporary unpaid leave for Raphel into a front page story with damaging after effects. Had this been investigated and resolved secretly, as per the rules, Raphel could have reapplied for her job after the FBI concluded there was no espionage case.
Pending further information, I suspect that it was someone in Raphel's camp who leaked those details. The best case situation for her was for this to be argued in the court of public opinion.