The American fleet headed to Midway following the breaking of the code. A Japanese submarine was in the area and could have radioed Tokyo but the fleet had passed. Could have changed the outcome of he war.
The Japs were supposed to have set up a screen of submarines to intercept the carriers coming out of Pearl to defend Midway. One of them never made it out of Kwajalein, and since Nimitz dispatched the carriers before Midway was attacked, the carriers were gone by the time the screen was set up.
Another IJN sub was supposed to go to Pearl and make sure the carriers were there. But the sub got spooked before making it there.